Linking problem on windows under cygwin

Jeffrey Morgan
Wed Feb 23 20:20:00 GMT 2005

I am trying to compile part of the java-gnome language bindings called
libgtk-java on Windows.  I am able to compile to library under cygwin
without problems.  When I try to run an example application it loads the
library libgtkjni.dll but fails to load the gtk dll (a lib linked
during compilation).  Both the gtkjni and gtk dlls are in my path and
they are also both included in my java.library.path.  I believe there
might be some magic needed in my makefile to fix this problem but I
don't know what.  My automake entry to build the gtkjni dll is:

libgtkjni_la_LDFLAGS = $(GTK_LIBS) -no-undefined -release $(gtkapiversion)

GTK_LIBS and GTK_CFLAGS are values coming from pkgconfig.  I
am using the following parameters for autogen:

env CC="gcc -mms-bitfields -mno-cygwin" ./
--host=i386-pc-mingw32 --build=i386-pc-ming32

What am I missing?

Thanks for your help.

More information about the Gcc-help mailing list