LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Linking to Shared Libraries with g++ (http://www.linuxquestions.org/questions/programming-9/linking-to-shared-libraries-with-g-455241/)

random0 06-15-2006 10:43 PM

Linking to Shared Libraries with g++
 
I'm working on a small project that I compile into a shared library. This project is done with autotools, so I have split major pieces into subdirectories which are put together as libtool libraries and then linked to my final shared library. But, when I link the shared library to my test program, it can access all library functions outside those that were in the libtool libraries. Those linked in libtool libraries return errors such as this when called:

Quote:

test.cpp:(.text+0x40): undefined reference to `raim::Error::Error(int, char const*)'
collect2: ld returned 1 exit status
How might I go about solving this problem?

random0 06-15-2006 11:12 PM

I've already discovered my solution. All that needed to be done was to add the -static flag when linking the convenience libraries.


All times are GMT -5. The time now is 05:30 AM.