Building fbsql.dll with MinGW Configuration: Windows XP Home MinGW 2.0 msys 1.0.8 gcc 3.2.3 MySQL 3.23.49 (Windows) ActiveState ActiveTcl 8.4.2.0 (Windows) fbsql.dll is built in three steps (see Makefile): (1) generate libmySQL.a from libmySQL.dll and libmySQL.def (see below) (2) compile fbsql.c: (a) slight modification in Fbsql_Init according to the Stubs-HowTo if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } (b) -DWINDOWS (see fbsql.c) -DUSE_TCL_STUBS -DUSE_COMPAT_CONST (see Tcl doc) (c) Tcl and MySQL include directories (3) link against libtclstub??.lib and libmySQL.a fbsql.dll depends on libmySQL.dll Eckhard Arnold and@ast.iitb.fhg.de ------------------------------------------------------------------------------- The remaining comes with libmySQL.def ------------------------------------------------------------------------------- Compiling MySQL clients with MinGW compiler MySQL version: 3.23.49 Installation for DevC++: Copy libmySQL.a to "DevC++\lib" Directory. Add -lmySQL to project=>projectOption=>LinkerOptions libmySQL.a was generated using the dlltool utility that comes with mingw. I used the libmySQL.dll that comes with MySQL windows version 3.23.49. If you find any trouble using the mysql libraries, try using the dlltool program with the command given below. dlltool --input-def libmySQL.def --dllname libmySQL.dll --output-lib libmySQL.a -k While compiling, if you are getting linker errors like "undefined reference to 'mysql_init@4'", edit the .def file and make sure there is a line mysql_init@4 there. After saving the file, run the above mentioned command. Dinesh V. R. dinesh@dvrsol.com http://www.dvrsol.com/