undefined reference - so I have to edit the Makefile?
I have a large amount of code, so I have tried to only include the relevant parts of the code here
I have a header file called "ASp.h" Code:
namespace ASP Code:
bool aSpQ(int argc, char* argv[]); Code:
bool aSpQ(int argc, char* argv[]) I have another file called "PBL.cpp". This compiled fine before, until I tried to include the files above in PBL.cpp Code:
#include "ASp/ASp.h" Code:
ASp* asp = new ASp(input);): I get the following errors: I get errors of undefined reference to ASP::ASp::ASp(_IOFILE*) and undefined reference to ASP::ASp::T_B_P_N(char const*, int) But Code:
ASp* asp = new ASp(input); Code:
ASp::T_B_P_N(char const*, int) Is there a linkage error? Do I need to make changes in the makefile? How do I get the linker to link against the ASp.cpp file? I am new to using Unix |
you need to post how do you compile (the commands you use or the makefile)
|
That actually looks like a link error... The library containing the definitions/functions was missing.
|
My coworker told me the problem is probably with the directories and libraries that are written in CMakeLists.txt. He tried to help briefly, but now he says that he can't help anymore
I have included the relevant parts of the CMakeLists to see if anyone can help in /ws/larryburns/cmake/ME/Build/sc/ME/CMakeLists.txt: Code:
SET(ME_LINK_LIBS Code:
ADD_SUBDIRECTORY (Ut) |
All times are GMT -5. The time now is 07:56 AM. |