开发者

How do I use MySql with Visual Studio 2010 C++?

I've been making a game using C# with XNA and using MySql to send data to a server. The other day however, I discovered the Irrlicht engine which is great, but the .NET wrapper is rubbish so I'm moving to C++.

However I can't get my head 开发者_开发百科around the MySql C++ connector at all. I've tried going through the "tutorials" on the official MySql website but had no luck. I'm using Visual Studio 2010 and following all of the instructions.

One problem I did have with the instructions was that they mentioned libmysql.dll and libmysql.lib. These simply weren't present in the download. I even tried the windows installer and that only managed to give me the DLL.


I don't know which document you've read at the official mysql site, but the MySQL Forge Wiki provides a very good introduction, including installation of the MySQL C++ Connector.

Update: Here is a link to a blog where the user has uploaded working connectors for C++ and VS2010. It's in german, but that shouldn't be a matter. You can also give How do I connect to MySQL 5.1 in Visual Studio 2010? a try.


It's working! Here's what you have to do:

  1. Manually install sqlstring.hpp, they forgot to put this in the windows installer.
  2. Install the boost library. (Even though you shouldn't have to...)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜