Welcome to the most active Linux Forum on the web.
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 01-30-2010, 10:19 AM   #1
Registered: Mar 2006
Location: Delft NL
Distribution: Debian; Slackware; windows 7
Posts: 218

Rep: Reputation: 53
adding gtk libraries to eclipse using C

So I decided to take my first steps into programming with C + gtk.

So far I have done
  1. I loaded eclipse and ensured I had the cdt package
  2. Created a new C/C++ project called "play"
  3. Added a new source file called "Playfullsrc.c"
  4. Added the following to paths and symbols (output of the command: pkg-config --cflags gtk+-2.0)
  5. added "/usr/lib/" to GCC C Linker Libaries (I have cheacked and this file exists)

When I build the project I get the error message "cannot find -l/usr/lib/ play line 0 C/C++ Problem"

I have been following this tutorial:

Have I missed something? Any help getting this working will be appreciated.
Old 01-31-2010, 04:46 AM   #2
Registered: Sep 2009
Location: Sparta
Posts: 237

Rep: Reputation: 46
You've probably messed up step 5. Does "it" look like this on your system: ?
Old 01-31-2010, 08:49 AM   #3
Registered: Mar 2006
Location: Delft NL
Distribution: Debian; Slackware; windows 7
Posts: 218

Original Poster
Rep: Reputation: 53
Thank you this was the problem. I should have added "gtk-x11-2.0"

I had tried
(at different times)

Anyway I have now but the correct line in and it works thank you.


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
Having trouble using the gtk libraries. debiant Programming 1 09-06-2006 05:53 AM
missing gtk+ libraries mystical_reality Linux - Software 2 10-01-2005 01:30 AM
GTK Libraries??? Kane635 Linux - Software 1 11-07-2004 10:23 PM
adding libraries shenoy Linux - Newbie 3 07-17-2004 08:42 AM
eclipse - motif or gtk spyghost Programming 2 09-19-2003 08:57 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:18 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
Open Source Consulting | Domain Registration