GCJ and MySQL Connector for Java

Anthony Green green@redhat.com
Tue Nov 29 09:52:00 GMT 2005


On Mon, 2005-11-21 at 20:34 +0200, Spyros Stathopoulos wrote:
> >When I said you need to force the library into you program, I meant by
> >creating mysql-connector-java-3.1.8.a file and the linking with
> >-Wl,--whole-archive,-lmysql-connector-java-3.1.8,--no-whole-archive.
> 
> I see, but how am I supposed to create an archive .a file from the
> .jar? 

You create .a files with ar.  But, now that I think about it, you don't
even need to do that.  Just create a .o file...

$ gcj -c -o mysql-connector-java-3.1.8.o mysql-connector-java-3.1.8.jar

...and link it into your application.

AG




More information about the Gcc-help mailing list