Hello,
I've been trying for several hours to get SOCI with MySQL built on my
windows machine (Win 7) with MinGW.
Every attempt I have made fails when it attempts to make the DLL.
Any advice would be helpful,
Robin
CMake command:
cmake -G "MinGW Makefiles" -DWITH_MYSQL=ON
-DMYSQL_INCLUDE_DIR="E:\MySQL\include"
-DMYSQL_LIBRARY="E:\MySQL\lib\mysqlclient.lib" -DWITH_BOOST=OFF ..
Ming32-make Stack Track:
Linking CXX shared library ..\..\bin\libsoci_mysql_3_1.dll
CMakeFiles\soci_mysql.dir/objects.a(common.cpp.obj):common.cpp:(.text+0x29d)
: undefined reference to `mysql_real_escape_string@16'
CMakeFiles\soci_mysql.dir/objects.a(session.cpp.obj):session.cpp:(.text+0xa4
1): undefined reference to `mysql_init@4'
CMakeFiles\soci_mysql.dir/objects.a(session.cpp.obj):session.cpp:(.text+0xb9
6): undefined reference to `mysql_real_connect@32'
CMakeFiles\soci_mysql.dir/objects.a(session.cpp.obj):session.cpp:(.text+0xbb
e): undefined reference to `mysql_error@4'
CMakeFiles\soci_mysql.dir/objects.a(session.cpp.obj):session.cpp:(.text+0xbf
2): undefined reference to `mysql_errno@4'
CMakeFiles\soci_mysql.dir/objects.a(session.cpp.obj):session.cpp:(.text+0xde
1): undefined reference to `mysql_real_query@12'
CMakeFiles\soci_mysql.dir/objects.a(session.cpp.obj):session.cpp:(.text+0xe1
4): undefined reference to `mysql_error@4'
CMakeFiles\soci_mysql.dir/objects.a(session.cpp.obj):session.cpp:(.text+0x10
4f): undefined reference to `mysql_close@4'
e:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe:
CMakeFiles\soci_mysql.dir/objects.a(session.cpp.obj): bad reloc address 0xe
in section
`.text$_ZN4soci7details15session_backendC2Ev[__ZN4soci7details15session_back
endC2Ev]'
collect2.exe: error: ld returned 1 exit status
backends\mysql\CMakeFiles\soci_mysql.dir\build.make:325: recipe for target
'bin/libsoci_mysql_3_1.dll' failed
mingw32-make[2]: *** [bin/libsoci_mysql_3_1.dll] Error 1
CMakeFiles\Makefile2:1278: recipe for target
'backends/mysql/CMakeFiles/soci_mysql.dir/all' failed
mingw32-make[1]: *** [backends/mysql/CMakeFiles/soci_mysql.dir/all] Error 2
Makefile:125: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users