Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

MySQL Connector C++ 1.1 Dynamic linking causes run-time error. (1 reply)

$
0
0
Hi.

I am developing an x86 C++ application and I'm going to connect my application to my mysql 5.1 server. I am using Windows 7 Ultimate x64 and Visual Studio 2008 Team System x64 as my IDE. I have no problems building x86 applications on this setup. Except when I've run a dynamically linked MySQL Connector C++ 1.1 application I get the following error:

http://img832.imageshack.us/img832/9649/mysqlerror.png

Please note that I've been using the x86 version of the connector (because I am developing an x86 application remember). In my project I've set it up to include the include folders of the Connector and MySQL Server API. I've also put in the preprocessor CPPCONN_PUBLIC_FUNC= to the project to prevent the mysql_proxy warnings during compilation. I've also added the lib/opt folders of both MySQL server (libmysql.lib) and the Connector as well adding as additional libraries both libmysql.lib and mysqlcppconn.lib. I've also copied the compiled x86 version binary dlls (libmysql.dll and mysqlcppconn.dll) on the EXE path.


In Debug and Release builds, it compiles and links perfectly fine! BUT running the resulting EXE shows http://img832.imageshack.us/img832/9649/mysqlerror.png.

I also tried the mysqlcppconn-static but it just ends up having linker problems that I cannot solve. Static linking is out of the question now because I really need the dynamically linked now.

Please help me find the solution to this, it has been days and this has been haunting me!

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>