GTK+ externals are unresolved

Reini Urban rurban@x-ray.at
Wed Dec 17 19:26:00 GMT 2008


Yaakov (Cygwin/X) schrieb:
> Reini Urban wrote:
>> The order of libs is wrong for $(pkg-config --libs gtk+-2.0)
>>
>> -lgtk-x11-2.0 -lgdk-x11-2.0 should be at the end.
>>
>> $ pkg-config --libs gtk+-2.0
>> -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
> 
> No, this is correct.
> 
>> Windows need the libs in the correct order, i.e. backwards.
> 
> No, the order is as with --as-needed on Linux, and in this case, where
> all those libs are shared, the order doesn't matter at all as long as
> they come after the object files which require them.

I tend to disagree.
With the original order:
-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

it fails to link, and with the reverse order of requires it works okay.

-L/usr/X11R6/lib -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lXft 
-lfreetype -lXrender -lXext -lfontconfig -lpangox-1.0 -lpango-1.0 
-lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lgdk-x11-2.0 -lgtk-x11-2.0 -lX11 
-lz -lintl -liconv

The windows linker doesn't allow unresolved symbols at linktime, the 
linux linker does.
-- 
Reini


--
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/



More information about the Cygwin mailing list