Compiling MySQL jdbc drivers

Lars Andersen lars@rimfaxe.com
Mon Jun 16 21:57:00 GMT 2003


> 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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /