Hi,
I'm migrating a C-project to C++. In C everything worked fine, and in moving to C++ I've reviewed all the code and corrected it where necessary (ie. more strict types required for pointers).
I'm at the point now where everything compiles and I'm having linking issues. For example, the message as I see it.
<path>/src/bin/CentOS_6.8_4.4.7_x64/lib/libcore.a(vsa_lib.o): In function 'vsa_type':
<path>/src/core/vsa_lib.c:56: undefined reference to 'inst_get'
<path>/src/core/vsa_lib.c:58: undefined reference to 'inst_get'
Before now I'd say I thought I understood the rules of linking, library order and what is invovled - what's really confusing me is that the function 'inst_get()' is defined in an object called 'inst.o' which is ALSO in the library libcore.a.
Incidicently some of the other executables in this project that do not include libcore.a do link properly.
I'm sorry the code is not something I can post in entirety (nor would anyone care to read it all) .. and I am unable to re-create a trival test case with the same problem.
Specifics:
OS: Cent OS 6.8
Compiler: Gcc/G++ 4.47
Reason for change: I need to re-use the functionality within a C++ project involving Qt dialogs.
What I've already looked it:
* Changing library order (no effect)
* Looking for possible name collisions (none)
nm -a libcore.a | c++filt <showing reduced output below>
inst.o:
0000000000015dcc T inst_get(char const *)
0000000000001a4e r inst_get(char const *)::__func__
vsa_lib.o:
U inst_get
Any help would be appreciated.
Thanks,
Brian