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: compiling with gcj


>>>>> "Adam" == Adam Satcowitz <adam at planbtechnologies dot 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


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