gcj problem compiling 850 files
Lars Andersen
lars@rimfaxe.com
Fri Jan 24 10:55:00 GMT 2003
On Fri, 2003年01月24日 at 09:32, magnus persson wrote:
> when compiling 850 class-files using gcj i get this
> error:
> gcj: installation problem, cannot exec
> `/cygdrive/c/cygwin/bin/../lib/gcc-lib/i686-pc-cygwin/3.2/collect2.exe':
> Invalid argument
>>> i used this line: (works ok when compiling one file).
> gcj -CLASSPATH
> C:\cygwin\usr\share\java\libgcj-3.2.jar:.
> com/mindark/*.class com/mindark/script/*.class
> -LC:\cygwin\lib\w32api
>
I have experienced problems with many input files as well, concerning
the mingw port. In the linux port there seems to be no limit to the
number of input classes, or at least I haven't bumped into it yet.
Windows is a completely different matter it seems. I solve it by
compiling in bites to .o object files, and then linking it all.
gcj -c [bunch of java files] -o object1.o
gcj -c [more java files] -o object2.o
gcj object1.o object2.o -static --main=Main -o a.exe
I'm not aware of any specific limitation to the number of files, but i
suspect it has something to do with the shell/command prompt used?
/Lars Andersen
More information about the Java
mailing list