brizio85 (AT) alice (DOT) it ha scritto:
Quote:
Hi! this is the first time I use mysql++.
While I'm compiling examples (MinGW[latest version] on Windows XP SP2)
I obtain this error:
g++ -L..\lib\debug -Lc:\mysql\lib\gcc debug/resetdb.o debug/util.o -oresetdb.
exe
-lmysqlpp -lmysqlclient
..\lib\debug/libmysqlpp.a(connection.o)(.text+0x395):connection .cpp: undefined
reference to `mysql_shutdown@4'
mingw32-make[1]: *** [resetdb.exe] Error 1
*******
the version of mysql++ is 2.0.7.
Can anyone help me? Thanks. |
In order to solve this specific problem you have to edit your
mysqlclient.def file, add @4 to mysql_shutdown and adjust any other
undefined reference in the same way, then apply dlltools, as described
in the documentation.
See the Windows paragraph of the tutorial at
http://www.synnottsoftware.com/tutorials/mysqlbasic.php to get the hang
of the issue. In this way you should be able to compile and link
mysql++ as a static library. It may take you some extra effort to get
there (e.g. you may have to run mingw32-make several times after it
dies down on some "usr/bin/sh -c: line 1: unexpected EOF while looking
for matching `"'). Every mingw32-make run will bring you further, just
don't make clean. Using Mingw I have successfully compiled mysql++
2.0.7 on my compute and run some of the examples .
As for building the DLL, that's another story, ... and a challenge.
In gamba.
t.