Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 22 Apr 2003 19:20:02 +0100 (WET DST) From: Nuno Moura E Silva Cruces To: cygwin AT cygwin DOT com Subject: Re: gcj and -mno-cygwin Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Just gotten -mno-cygwin to work with gcj, don't know if someone's interested. First of all get the latest gcc and gcc-mingw packages any cygwin mirror. If it already works... well... it works! If is doesn't and you get something like: $ gcj -mno-cygwin --main=HelloWorld -o HelloWorld.exe HelloWorld.java gcj: installation problem, cannot exec `jc1': No such file or directory You have to create symbolic links to jc1.exe and jvgenmain.exe in /usr/lib/gcc-lib/i686-pc-mingw32/3.2/ which point to ../../i686-pc-cygwin/3.2/ Do it this way: $ cd /usr/lib/gcc-lib/i686-pc-mingw32/3.2 $ ln -s ../../i686-pc-cygwin/3.2/jc1.exe $ ln -s ../../i686-pc-cygwin/3.2/jvgenmain.exe You can try it again now, but you'll probably get a lot of undefined references when compiling HelloWorld.java with -mno-cygwin: $ gcj -mno-cygwin --main=HelloWorld -o HelloWorld.exe HelloWorld.java /usr/lib/gcc-lib/i686-pc-mingw32/3.2/../../../libgcj.a(prims.o)(.text+0x517): undefined reference to `_impure_ptr' /usr/lib/gcc-lib/i686-pc-mingw32/3.2/../../../libgcj.a(posix.o)(.text+0x23): undefined reference to `gettimeofday' /usr/lib/gcc-lib/i686-pc-mingw32/3.2/../../../libgcj.a(posix.o)(.text+0x7a): undefined reference to `sigemptyset' ... What you need now is the MinGW port of libgcj, which you can get from the MinGW's Sourceforge project hosted at: http://sourceforge.net/project/showfiles.php?group_id=2435 http://mingw.org -> for more on MinGW Download the latest gcj binaries, which are probably still listed under "release candidates" the type is ".gz" Unpack them to some temporary directory and then copy the following files (assuming you unpacked to the current directory): $ cp lib/libgcj.* /lib/mingw Try yet again now, and hopefully it will work! You can now remove all the temporary files. Nuno Cruces -- 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/