This is the mail archive of the
mailing list for the GCC project.
gcj and handling own packages question
- From: Florian Weitling <weitling at informatik dot uni-freiburg dot de>
- To: gcc at gnu dot org
- Date: Tue, 13 Jan 2004 10:18:30 +0100 (MET)
- Subject: gcj and handling own packages question
I tried compiling my own Java-Files to nate. They resided in directories
representing their packages, and I tried it with and without ".", "/" and
option "-I" and "classpath". Argh, didn't work.
Ok, next try: Stripped all imports and package in the files, deleted all
*.o (to be sure), put them all in one directory, compiled with
gcj -c -g -I . -O *java
worked! Tried to make an executable (forgot to say: actual Cygwin/WinXP)
$ gcj -I . --main=Anonymizer *.o
/Temp/cc7ATHYp.o(.text+0x39): In function `main':
/Temp/cc7qOYPg.i: undefined reference to `Anonymizer::class$'
collect2: ld returned 1 exit status
I had a long journey thru the net... but didn't find any worthy
explanation or tip.
"Everything should be as simple as possible but no simpler."