Linking question

Mark Anderson mark@panonet.net
Mon Oct 21 06:10:00 GMT 2002


I have just started using gcj and I am trying to compile some code into native 
form. This code relies on other code found in JAR files which I have 
specified using -I.
An example of the command I am using is given below along with its output:

gcj --main=LinkTest -Iutil_jar.jar -o LinkTest LinkTest.java
/tmp/ccigNOif.o: In function `LinkTest::main(JArray<java::lang::String*>*)':
/tmp/ccigNOif.o(.text+0x44): undefined reference to 
`com::ravnaandtines::util::text::Hexprint::fmt(int)'
collect2: ld returned 1 exit status

I understand that the error is being caused because the com....Hexprint class 
is not availble in a library as native code. However, I thought that with gcj 
you could mix native and bytecodes.

Therefore, my question is do I need to compile the JAR file to native code or 
is there any way I can create my binary without doing this?

-- 
Regards,
Mark



More information about the Java mailing list