Re: [Java-gnome-developer] Compile natively and static in windows
Brought to you by:
afcowie
From: Nicholas R. <ni...@mn...> - 2005-05-24 10:52:34
|
There seems to be several problems with compiling natively on windows: 1. The WindowsCompilation page (which I wrote :-) says to run configure with the --without-gcj-compile option. This makes the build process skip the building of the libgtkjava library. This library is needed however if you want to compile natively with GCJ. On linux, having configured and make'd without the --without-gcj-compile option, i am able to natively compile using this command: % cd doc/examples/TestTree % gcj --classpath=/usr/local/jg-2.10/share/java/gtk2.6.jar --main=TestTree.TestTree -L/usr/local/jg-2.10/lib -lgtkjava -o TestTree TestTree.java (NOTE: i also configured using the --prefix=/usr/local/jg-2.10 option.) So, it should be the same process under windows (run configure without the --without-gcj-compile option; use the gcj line above). However there are other problems. :-) 2. The configure script will not work if you don't use the --without-gcj-compile option due to a bug in the gcj detection macros we use. I patched my version to fix the gcj detection under windows, but still have not been able to create a native executable under windows. I am going to dig deeper here as i think there are some other issues related to the gcj build process under windows, which prevents the correct creation of the libgtkjava.so library. I'll let you know once i find out more. Cheers, Nick On Mon, 2005-05-23 at 20:17 +0200, llanero wrote: > 2005/5/23, Joao Victor <jvi...@ya...>: > > Are you able to run the example program, like it is said in the WindowsCompilation? (i mean, just > > run, without compiling it natively/statically). I'm asking that so we can narrow the problem. > > Yes, the examples work great, see below. I also can compile run > applications from eclipse. > > I also tried: > > $ ld -l gtkjar2.6 > c:\minGW\bin\ld.exe: cannot find -lgtkjar2.6 > > $ ld -l gtkjava > c:\minGW\bin\ld.exe: cannot find -lgtkjava > > Running the examples: > > /usr/local/src/libgtk-java-2.6.2/doc/examples > $ ./runExample.sh testgtk/TestGTK > Java-Gnome Example Application Launcher > > Checking for jvm and compiler availability... > gcj and gij - appear to be ok > > You are using Open Source java > virtual machine and compiler: this is so good! > > Checking if library paths exist... > /usr/local/lib - appears to be ok > > Testing JAR archives... > /usr/local/share/java/gtk2.6-2.6.2.jar - appears to be ok > > Compilation successful > Application successfully terminated > > > > > |