This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Compiling MySQL jdbc drivers
- From: Lars Andersen <lars at rimfaxe dot com>
- To: Erik Poupaert <erik dot poupaert at chello dot be>
- Cc: java at gcc dot gnu dot org
- Date: 16 Jun 2003 23:57:26 +0200
- Subject: Re: Compiling MySQL jdbc drivers
- Organization: Rimfaxe Software
- References: <1055798550.29379.29.camel@lamanote.rimfaxe.com> <20030616234137.72a1ffea.erik.poupaert@chello.be>
> I don't know how to do it dynamically. I use
> libcom-mysql-jdbc-3-1-nightly-20030316.a and link it into the
> executable. Good luck with the .so/.dll approach. Let me know if that
> works as well.
>
Yes!
It worked right away!
I have made a simplistic makefile like this :
>>>>>>>>>>>>>>>>>>>>>>>>
#
# MYSQL JDBC for use with GCJ
#
JAVA_COMPILER=/usr/local/bin/gcj
libMySQL_JDBC.so : libMySQL_JDBC.o
$(JAVA_COMPILER) \
libMySQL_JDBC.o \
-shared -o libMySQL_JDBC.so
libMySQL_JDBC.o : com/mysql/jdbc/profiler/*.java com/mysql/jdbc/*.java
org/gjt/mm/mysql/Driver.ja
$(JAVA_COMPILER) -Wno-deprecated -c \
com/mysql/jdbc/profiler/*.java \
org/gjt/mm/mysql/Driver.java \
com/mysql/jdbc/*.java \
-o libMySQL_JDBC.o
<<<<<<<<<<<<<<<<<<<<<<<<
I load libMySQL_JDBC.so into my app, and off I go...
I will make a zip of it all, and put it up for general download.
Excpect it done sometime tomorrow.
/Lars Andersen