public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* GTK+ externals are unresolved
@ 2008-12-15 21:20 M.O.D.
  2008-12-15 22:32 ` Greg Chicares
  2008-12-15 22:45 ` John Emmas
  0 siblings, 2 replies; 17+ messages in thread
From: M.O.D. @ 2008-12-15 21:20 UTC (permalink / raw)
  To: cygwin

When I compile a GTK+ application in Cygwin, all the GTK externals are 
unresolved.  Output from pkg-config and the /usr/lib directory look fine, and 
are included below along with the linkage errors and the source program.

I downloaded and installed Cygwin last week.

I have compiled and run this little program on Slackware without any problem.

Why are the GTK externals going unresolved on Cygwin?

Thanks,
   Ollie

----------------------------------------------------------------------------
$ cc `pkg-config --cflags --libs gtk+-2.0` murg.c -o murg
/cygdrive/c/Users/pd/AppData/Local/Temp/ccPuIk43.o:murg.c:(.text+0x2b): 
undefined reference to `_gtk_set_locale'
/cygdrive/c/Users/pd/AppData/Local/Temp/ccPuIk43.o:murg.c:(.text+0x55): 
undefined reference to `_gtk_init_abi_check'
/cygdrive/c/Users/pd/AppData/Local/Temp/ccPuIk43.o:murg.c:(.text+0x61): 
undefined reference to `_gtk_window_new'
/cygdrive/c/Users/pd/AppData/Local/Temp/ccPuIk43.o:murg.c:(.text+0x73): 
undefined reference to `_gtk_widget_show_all'
/cygdrive/c/Users/pd/AppData/Local/Temp/ccPuIk43.o:murg.c:(.text+0x78): 
undefined reference to `_gtk_main'
collect2: ld returned 1 exit status
----------------------------------------------------------------------------

----------------------------------------------------------------------------
$ pkg-config --cflags --libs gtk+-2.0
-DXTHREADS -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -
I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -
I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -
L/usr/X11R6/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -
lpangoxft-1.0 -lXft -lfreetype -lz -lXrender -lXext -lfontconfig -lpangox-1.0 -
lX11 -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv
----------------------------------------------------------------------------

----------------------------------------------------------------------------
$ ls /usr/lib/*gtk*
/usr/lib/libgnorbagtk.dll.a    /usr/lib/libgtk.la
/usr/lib/libgnorbagtk.la       /usr/lib/libgtkhtml-2.dll.a
/usr/lib/libgtk-x11-2.0.dll.a  /usr/lib/libgtkhtml-2.la
/usr/lib/libgtk-x11-2.0.la     /usr/lib/libgtkxmhtml.dll.a
/usr/lib/libgtk.dll.a          /usr/lib/libgtkxmhtml.la
----------------------------------------------------------------------------

----------------------------------------------------------------------------
$ more murg.c
#include <stdio.h>
#include <gtk/gtk.h>

static GtkWidget* wintop;

int main (int argc, char **argv) {
gtk_set_locale ();
gtk_init (&argc, &argv);
wintop = gtk_window_new(GTK_WINDOW_TOPLEVEL);
/* Set up our GUI elements */
gtk_widget_show_all (wintop);
gtk_main ();
return 0;
}
----------------------------------------------------------------------------



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-12-22 13:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-15 21:20 GTK+ externals are unresolved M.O.D.
2008-12-15 22:32 ` Greg Chicares
2008-12-16  0:15   ` M.O.D.
2008-12-15 22:45 ` John Emmas
2008-12-16  6:01   ` Andreas Eibach
2008-12-16 19:08   ` M.O.D.
2008-12-16 20:20     ` Reini Urban
2008-12-16 20:38       ` Yaakov (Cygwin/X)
2008-12-17 19:26         ` Reini Urban
2008-12-17 22:37           ` Yaakov (Cygwin/X)
2008-12-18  0:47             ` René Berber
2008-12-18  6:01               ` Yaakov (Cygwin/X)
2008-12-20 15:44                 ` Reini Urban
2008-12-21  0:45                   ` Yaakov (Cygwin/X)
2008-12-21 15:29                     ` M.O.D.
2008-12-21 16:18                       ` Yaakov (Cygwin/X)
2008-12-22 13:29                         ` M.O.D.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).