Getting GCJ to work under Windows/MinGW/MSYS

Joerg Brunsmann joerg_brunsmann@yahoo.de
Mon Sep 16 07:48:00 GMT 2002


Hi,
based on the work of Ranjit patches one can build a mingw hosted and 
targeted gcc 3.2 on Windows NT SP6a with these instructions:
1. From http://sourceforge.net/project/showfiles.php?group_id=2435 
 download binutils 2.13-20020903-1, mingw-runtime 2.2, w32api 2.0,
 MSYS 1.0.7-2 and mingw 1.1 
2. From http://sourceforge.net/projects/mingwrep/ download libregex 0.12 
3. Install mingw1.1 to c:\mingw
4. Install binutils, mingw-runtime, w32api and libregex to c:\mingw
5. Install mysys to c:\msys1円.0
6. Start c:\msys1円.0\msys.bat
7. Run these commands
 $ cd /c
 $ mkdir gcc3.2
8. Download the patched GCC 3.2 (gcc-3.2-20020817-1.src.tar.gz) from 
 http://sourceforge.net/project/showfiles.php?group_id=2435 and the
 gcc-java source package (gcc-java-3.2.tar.gz) from a site listed 
 at http://gcc.gnu.org/mirrors.html and put these files in "/c/gcc3.2"
9. Run these commands
 $ cd /c/gcc3.2
 $ mkdir build
 $ gunzip *.tar.gz
 $ tar xfv gcc-3.2-20020817-1.src.tar
 $ mv gcc-3.2-20020817-1 gcc-3.2
 $ tar xfv gcc-java-3.2.tar
10. Copy all files from Ranjit's attachment 
 http://gcc.gnu.org/ml/java/2002-09/msg00072.html 
 to the build directory "/c/gcc3.2/build"
11. Run these commands
 $ cd /c/gcc3.2/gcc-3.2
 $ patch -p0 -b < ../build/mypatches.diff
 $ cd ../build
 $ cfggcc.sh
 $ mkgcc.sh
12. Run
 $ make prefix=/mygcc install
13. Install the same versions of binutils, mingw-runtime and w32api that were used to 
 build GCC into "/mygcc"
14. Edit a file HelloWorld.java
 public class HelloWorld {
 public static void main(String [] args) {
 System.out.println("Hello");
 }
 }
15. Compile and run 
 $ /mygcc/bin/gcj --main=HelloWorld -g0 -o hello HelloWorld.java
 $ ./hello
16. Volunteer to try out some win32 awt files from
 http://www.kaffe.org/cgi-bin/viewcvs.cgi/kaffe/libraries/clib/awt/win32/
 or try out this
 http://www-106.ibm.com/developerworks/java/library/j-nativegui/?loc=j
Jörg
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de
Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /