Cross Platform C++ Database library?

Started by
11 comments, last by SimonForsman 9 years, 9 months ago

I basically need a free c++ library for doing MySQL operations. It needs to work on Windows, Android, IOS, Mac. Does anyone have some suggestions?

Advertisement

The library IS MySQL, specifically the MySQL client library. It's a C API.

http://dev.mysql.com/doc/refman/5.0/en/c-api-building-clients.html

http://dev.mysql.com/doc/refman/5.0/en/c-api-function-overview.html

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

But I see it uses boost, which has dlls, so wouldn't that be a problem for cross platform?

If you don't literally need MySQL, you might also consider SQLite. Android/iOS implies to me that you might be needing some kind of offline mode and not connecting to an actual server, so an embedded DB like SQLite could make more sense than trying to use embedded MySQL.

Sean Middleditch – Game Systems Engineer – Join my team!

But I see it uses boost, which has dlls, so wouldn't that be a problem for cross platform?


Boost can be statically linked and compiles on a wide range of platforms.

Sean Middleditch – Game Systems Engineer – Join my team!

^

| oh well, I admit I didn't think of that. Also, no, I don't need it for offline use, I basically need to store ids and passwords for a multiplayer game. I guess I'll go with the mysql client library and link everything statically, including boost. Hope it works.

But I see it uses boost, which has dlls, so wouldn't that be a problem for cross platform?

I don't know where you're seeing boost. The MySQL client library is a pure C API.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

Sorry, I downloaded the connectors, not the actual source. I actually have trouble finding the windows source, could you help with a link?

^
| oh well, I admit I didn't think of that. Also, no, I don't need it for offline use, I basically need to store ids and passwords for a multiplayer game. I guess I'll go with the mysql client library and link everything statically, including boost. Hope it works.


Then you absolutely _DO NOT_ want to care about iOS/Mac/Windows/etc. support, as it would be pure unadulterated madness to have the client connecting to the database directly.

The client should connect to some kind of front-end service (either the game over a custom protocol or an HTTP service) and make its login request to that. That service (running on an server somewhere, probably on Linux) then connects to the database, which is located internal to your network/data-centers/VPNs and behind a firewall.

Sean Middleditch – Game Systems Engineer – Join my team!

Ok, got the message, but still, where is the source for MySql?, I can't still find it.

Also, why do you think its such a bad ideea to connect to a database directly?

This topic is closed to new replies.

Advertisement