compiling with gcj
Tom Tromey
tromey@redhat.com
Thu Mar 13 06:48:00 GMT 2003
>>>>> "Adam" == Adam Satcowitz <adam@planbtechnologies.com> writes:
Adam> i type: gcj --main=SendMailMessage
Adam> d:\inetpub\classes\com\planbtechnologies\SendMailMessage.java
Adam> i get:
Adam> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccqKaaaa.o: In function
Adam> `ZN15SendMailMessage4mainEP6JArrayIPN4java4lang6StringEE':
Adam> d:/inetpub/classes/com/planbtechnologies/SendMailMessage.java:32:
Adam> undefined reference to `com::planbtechnologies::TextTools
Adam> ::parseOnString(java::lang::String*, java::lang::String*,
Adam> java::lang::String*, bool)'
With gcj, all the dependencies of your program must be compiled and
linked into the program. In the above, you are only compiling
SendMailMessage.java. But you also need to compile TextTools.java and
link it in.
Try:
gcj -c .../SendMailMessage.java
gcj -c .../TextTools.java
gcj --main=com.planbtechnologies.SendMailMessage *.o
Note that the argument to --main is the fully-qualified class name.
Tom
More information about the Java
mailing list