LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-14-2004, 05:49 PM   #1
doody
LQ Newbie
 
Registered: Aug 2004
Distribution: Slackware
Posts: 28

Rep: Reputation: 15
Help with gtk+ (solved)


I'm using slackware, and it came with two versions of gtk+.

Here's what's in /var/log/packages:

gtk+-1.2.10-i386-3
gtk+2-2.4.3-i486-1

gtk-config is installed and is located at /usr/bin/gtk-config


I'm trying to compile a small gtk+ example from a book, and I'm getting the following errors:



Code:
@dev:/home/dev/Projects/Gtk+/learning# gcc -Wall a.c -o a `gtk-config --cflags --libs`
a.c: In function `main':
a.c:56: warning: implicit declaration of function `g_signal_connect'
a.c:56: warning: implicit declaration of function `G_OBJECT'
a.c:57: warning: implicit declaration of function `G_CALLBACK'
a.c:80: warning: implicit declaration of function `g_signal_connect_swapped'
/tmp/ccwuOYm6.o(.text+0x80): In function `main':
: undefined reference to `G_CALLBACK'
/tmp/ccwuOYm6.o(.text+0x91): In function `main':
: undefined reference to `G_OBJECT'
/tmp/ccwuOYm6.o(.text+0x9a): In function `main':
: undefined reference to `g_signal_connect'
/tmp/ccwuOYm6.o(.text+0xac): In function `main':
: undefined reference to `G_CALLBACK'
/tmp/ccwuOYm6.o(.text+0xbd): In function `main':
: undefined reference to `G_OBJECT'
/tmp/ccwuOYm6.o(.text+0xc6): In function `main':
: undefined reference to `g_signal_connect'
/tmp/ccwuOYm6.o(.text+0x113): In function `main':
: undefined reference to `G_CALLBACK'
/tmp/ccwuOYm6.o(.text+0x124): In function `main':
: undefined reference to `G_OBJECT'
/tmp/ccwuOYm6.o(.text+0x12d): In function `main':
: undefined reference to `g_signal_connect'
/tmp/ccwuOYm6.o(.text+0x13b): In function `main':
: undefined reference to `G_OBJECT'
/tmp/ccwuOYm6.o(.text+0x14c): In function `main':
: undefined reference to `G_CALLBACK'
/tmp/ccwuOYm6.o(.text+0x15d): In function `main':
: undefined reference to `G_OBJECT'
/tmp/ccwuOYm6.o(.text+0x166): In function `main':
: undefined reference to `g_signal_connect_swapped'
collect2: ld returned 1 exit status
I'm thinking this is because gtk-config is returning the older version of gtk. I'm lost as to how to fix this though. I've been searching google for the last 45 minutes or so without any luck. Any info/advice would be hugely appreciated.

Last edited by doody; 10-14-2004 at 09:56 PM.
 
Old 10-14-2004, 05:55 PM   #2
doody
LQ Newbie
 
Registered: Aug 2004
Distribution: Slackware
Posts: 28

Original Poster
Rep: Reputation: 15
OK, the problem is definitely gtk-config returning version 1.2 of gtk because I just succesfully compiled a small hello world application using 1.2. I'm not sure where to go from here though....
 
Old 10-14-2004, 09:58 PM   #3
doody
LQ Newbie
 
Registered: Aug 2004
Distribution: Slackware
Posts: 28

Original Poster
Rep: Reputation: 15
I figured it out by taking a look at a makefile produced by MinGW. I need to use:

`pkg-config --cflags --libs gtk+-2.0`

and not:

`gtk-config`

I do wish _someone_ would have replied though... oh well =)
 
  


Reply


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
Freerock uninstall stole GTK looking for up-to-date pango, atk, gtk, glib and xft tgz Oholiab Slackware 8 09-18-2005 11:57 AM
GTK source install doesn't give gtk-config Feebles Linux - Software 4 06-15-2005 12:51 PM
cant find gtk-config file or gtk-devel to install happychappy Linux - Software 2 02-16-2005 12:46 AM
GTK error when starting gtk-chtheme Dswissmiss Linux - Software 1 10-01-2004 11:53 PM
compiling gaim/ gtk error (two versions of gtk) webazoid Linux - Software 0 07-06-2004 06:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:05 PM.

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