Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-15-2006, 10:43 PM   #1
LQ Newbie
Registered: Jun 2006
Location: Gainesville, Fl, USA
Distribution: Debian GNU/Linux
Posts: 18

Rep: Reputation: 0
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:

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?
Old 06-15-2006, 11:12 PM   #2
LQ Newbie
Registered: Jun 2006
Location: Gainesville, Fl, USA
Distribution: Debian GNU/Linux
Posts: 18

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking static and shared libraries in the KDevelop Environment tristanm Programming 15 11-27-2006 10:59 PM
any links on linking, loading shared libraries, shared objects. etc? ananthbv Programming 0 02-03-2005 08:47 AM
Shared libraries and linking., devin Programming 3 04-08-2003 04:18 PM
Linking to shared libraries? Griffon26 Programming 1 10-20-2001 06:29 PM
linking with shared libraries kobilevi Programming 0 03-01-2001 11:09 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration