Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-13-2006, 05:16 PM   #1
LQ Newbie
Registered: Nov 2004
Distribution: Suse 9.2
Posts: 8

Rep: Reputation: 0
Unhappy Library Linking problem

The problem is that I don't know how.

I want to work mainly with Anjuta IDE and FLTK. I've read Anjuta's site on how to link libraries but I seem to get nothing.

I'm a little miffed by the whole thng. Can someone talk to me like a grade schooler and help me link the necessary libraries?

Many thanks!

If you work with KDevelop, please tell me also I would be interested in using it too!

My project is in C++ and FLTK.
FLTK is installed by default on my distro so I know everything is in there.
Old 02-13-2006, 10:37 PM   #2
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
c++ shared library basics
if you already have compiled the object file for your source code but not linked
g++ -o myApp Myapp.o -L/path/to/shared/lib -lsharedlib
to do it all in one swoop
g++ -o myApp Myapp.c -L/path/to/shared/lib -lsharedlib

where sharedlib is in the directory described in the path after -L
and is named

there are always some odd situations but thats it in a gnutshell
Old 02-13-2006, 11:40 PM   #3
LQ Newbie
Registered: Nov 2004
Distribution: Suse 9.2
Posts: 8

Original Poster
Rep: Reputation: 0
Thank you,

but could you tell me how to do it through Anjuta IDE?
They have about three or four different things to do to link against libraries.

Thanks in advance.
Old 02-14-2006, 12:10 PM   #4
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 31
No idea how to do it through Anjuta. Nor do I know how to do that with Eclipse, or (nor?) Kdevelop. I *can* however write a makefile. Regarding makefiles, it's like Han Solo said, "She may not look like much, but she's got it where it counts, kid."

In general, you should first learn the actual compile/link commands themselves (as foo_bar_foo described), and only then -- only after it becomes boring 2nd-nature routine rather than a daunting and confusing task -- should you resort to automatic build tools.

Take the time to learn make/scons/jam/ant/whatever, and type in the g++ commands into your build files yourself. You'll be glad you learned.


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 with a library stonehurstX11 Linux - Newbie 4 01-04-2006 04:07 PM
Commandline legth problem linking a shared library DavePrince Linux - Software 0 07-20-2005 08:19 AM
Still library linking problem The_Nerd Programming 19 05-20-2004 04:08 PM
Library linking problem The_Nerd Programming 10 04-26-2004 11:07 PM
linking own library bobby2k3 Programming 2 10-20-2003 10:36 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:58 AM.

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