LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Linking own library: undefined reference to (https://www.linuxquestions.org/questions/programming-9/linking-own-library-undefined-reference-to-261644/)

otosigo 12-02-2004 04:14 AM

Linking own library: undefined reference to
 
Hi everybody,

I have done a library (libIRController.so) which I use in a bigger project. When I compile this bigger project I get the following error:
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libIRController.so: undefined reference to `DBShowStatus()'.

Here are the steps I have follwed:
1)This function is defined in fileio.h and implemented in fileio.c. Then I have created a Qt class (IRCodeNormalizer) from where I call this function. Then I have other class that has an instance of IRCodeNormalizer. I compile the library and I get my libIRController.so* files.
2) I move this librarys to /usr/lib/
3)Then I go to the 'bigger project' and try to compile it, but get this link? error.
When I remove calls to DBShowStatus() in IRCodeNormalizer, everything compiles ok. But then I don't have the functionality I want :(

Any ideas?

PS: I can post the Makefile, the Qt .pro file and some code if necessary.

Thanks in advanced

acid_kewpie 12-02-2004 08:05 AM

have you rerun ldconfig?


All times are GMT -5. The time now is 06:49 PM.