Re: Linking problem on windows under cygwin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To summarize, here is what I know so far.  I am compiling libgtk-java on
a windows platform using gcc 3.3.3 under a cygwin environment.  I am
specifying the following parameters to my configure / autogen scripts:

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

I am linking with the following libs:

-Lc:/GTK/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2
.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -
lintl -liconv

and am specifying '-no-undefined' during the linking process.

The library compiles without any problems and builds a dll.  This
dll contains JNI code that provides the language binding.  When I 
try to run a small example program that uses this library I get the 
following error from the Java code:

java.lang.UnsatisfiedLinkError: gtk_init

gtk_init is the first method called in the application.  The problem is that
the java code is calling the native method gtk_init but the real JNI method
is Java_org_gnu_gtk_Gtk_gtk_1init and I have verified that this method does
exist in the dll.  I have also changed the application so it calls
another method
first but it makes no difference - I still get this error with another
method.  On
other platforms (I test on Linux and Solaris) this name resolution/translation 
takes place and I do not get this error.

I haven't opened a bugzilla report since I am not sure if the problem is with
gcc, my Makefile, or Java.  Any help you might be able to provide would be
greatly appreciated.

Thanks
-Jeff

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux