tags:

views:

75

answers:

1

Hi,

I've stuck myself in a c++ project under linux ,for which I get an undefined reference when I try to create an object of a class that I just wrote.I believe this is an linker error caused by the fact that somewhere , somehow I should tell the linker to take into account the new class. I looked at the project properties and at the run command it executes a script (cmake.sh) . Because the project wasn't created by me , and because I'm a novice in working under linux, I just don't know how to direct the linker to do what I expect him to do !

+1  A: 

Is your new source file included in the makefile for the project you're working on? (I'm guessing it's a makefile based on the shell script being names cmake.sh. If the script isn't using make, then the project description file will have a different name....)

jwismar
No, it's not included , how should I included it ?
I just looked up CMake, and found that it's not as straightforward <cough> as a makefile.... I'd suggest, take a look at the file that controls the CMake configuration in your project, and see how the other .cc or .cpp files are referenced.
jwismar
Thanks a bunch !