compiling using g++ results to undefined reference
Expand Post »
I'm running my program in linux v. 2.6.20 and gcc v. 4.1.2...i got a problem here...when i compile my source code .cpp using gcc there's no error... but when i compile using g++ there's an error "undefined reference".
sample:
File.cpp: (.text+0xc50): Undefined reference to 'ClassB::Close'
Re: compiling using g++ results to undefined reference
Must be something to do with the way you're using them.. parameters etc.. see which object file or .so or .a file contains teh required symbols and add that on link cmd..
Re: compiling using g++ results to undefined reference
i already check my source code and all the include files were linked together...the only problem was that the Classes of B were undefined reference to my main source code....
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.