Unable to find a symbol

I have an function defined klifo_create. I am making an archive out of it using

ar qcv and then linking it with another code.

On running I am getting

Undefined symbol: _Z12klifo_createiii

On checking the symbol table, I get the following:

0002723c t _Z10findVictimP7klifo_tjj
00026f5a t _Z11changePhaseP7klifo_tj
0002745a t _Z11findVictim1P7klifo_tjj
U _Z12klifo_createiii
0002977e t _Z12klifo_createjjj
00028b3c t _Z13updateCounterP7klifo_tjj
00026fe0 t _Z13updateUseBinsP7klifo_tm
00027526 t _Z15klifo_dumpStatsP7klifo_tPc
00026e46 t _Z16prepareNextEpochP7klifo_tj
00028fac t _Z17klifo_updateOnHitP7klifo_tjjjjPc
00027c00 t _Z18klifo_updateOnFillP7klifo_tjjjjPiPc
00028ce4 t _Z18klifo_updateOnMissP7klifo_tjjjjPc
00026efc t _Z20resetChooserCountersP7klifo_tj
00027948 t _Z21calculateEscapePointsP7klifo_tj
000270f6 t _Z22getCurrentFillPositionP7klifo_tjjj
000287c0 t _Z29klifo_getReplacementCandidateP7klifo_tjjPjS1_
00027126 t _Z31klifo_updateCurrentFillPositionP7klifo_tjjj
00026e10 t _Z8findTypeP7klifo_tjj
002d00a0 r _ZZ12klifo_createjjjE19__PRETTY_FUNCTION__
002d0060 r _ZZ13updateCounterP7klifo_tjjE19__PRETTY_FUNCTION__
002d0000 r _ZZ17klifo_updateOnHitP7klifo_tjjjjPcE19__PRETTY_FUNCTION__
002cfec0 r _ZZ18klifo_updateOnFillP7klifo_tjjjjPiPcE19__PRETTY_FUNCTION__
002cff40 r _ZZ21calculateEscapePointsP7klifo_tjE19__PRETTY_FUNCTION__
002cff80 r _ZZ29klifo_getReplacementCandidateP7klifo_tjjPjS1_E19__PRETTY_FUNCTION__


Why there are two symbols created for the function klifo_create. And what are these PRETTY_FUNCTION?

Thanks
C++ names are mangled, hence the output.
http://en.wikipedia.org/wiki/Name_mangling

Is your klifo_create function declared in a header file and not inlined?
Thanks, had a mismatch in .h and .cpp files. sorry to bother...
Topic archived. No new replies allowed.