This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj compilation


Fx Mx wrote:


bash-2.05b$ gcj --main=thing thing.java
/tmp/cceHFZpD.o(.text+0x13): In function
`thing::main(JArray<java::lang::String*>*)':
: undefined reference to `beasts::Animal::FreakOut()'
collect2: ld returned 1 exit status

You need to also link in the Animal class. Try: $ gcj -main=thing thing.java Animal.java -o thing $ ./thing [At least on Unix-like systems system as GNU/Linux]

You can also use gij:
$ gij thing
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]