This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCJ and MySQL Connector for Java
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