Can anyone point my in the right direction? This is proprietary code so I can't upload the makefiles.
But here's the output of nm on libA
:
libA.a:someOfile.o: U _Z12funcABCPcPA80_cii
libA.a:overhead.o: U _Z12funcABCPcPA80_cii
And here is nm of libB
, where the function of interest rendering undefined references
from two other functions:
libB.a:funcABC.o:0000000000000000 T _Z12funcABCPcPA64_ci
There was a similar project done that matches _Z12FUNCABCPcPA64_ci
. Im working porting the code base to support a new platform.
This nm output of the similar project:
libB.a:funcABC.o:0000000000000000 T _Z12funcABCPcPA64_c
libA.a:overhead.o: U _Z12funcABCPcPA64_c
Clarification: I only replaced the function name for the sake of posting on SO :)
Original function signature, on both projects:
#define LENGTH 64
bool funcABC( char* arg1, char arg2 [][LENGTH], int arg3)
Solution:
The library in question wasn't ported correctly. That is libB
was an older version, that I didn't port. Thus it kept giving linking errors because of the comments below. libB
should had the following declaration, and I should have been careful on reading the function definition.
bool funcABC(char*arg1, char arg2 [] [LENGTH_INHEADER], int arg3, int arg4)
In funcABC.cpp
, the width of arg2
was based on LENGTH 64
. In funcABC.h
, the width was intended to be LENGTH_INHEADER 80
.