undefined reference linker error
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 !
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....)
精彩评论