Jump to content

mySQL support in T3D 3.6, Windows 10, VS Studio 2015 Express


Recommended Posts

I am currently trying to get this resource:


Working in T3D 3.6, under Windows 10, with Visual Studio 2015 Express edition.

This resource works find on the same machine and compiler with an earlier version of the engine, but with the new version, it gives me the following error when I try to start the exe:

"Unable to load game library: ".

It is complaining about my project exe! The exe works fine when I remove the two .cc files in the above resource. I suspect the issue is that the mysql libs are out of date, and wont run properly on the new version of T3D.

Is there an up to date resource available?

How difficult is it to integrate the most up to date mysql connector with T3D?

This link:



Provides what looks like a simple implementation, would something like this, exposed to script, work in T3D?


Link to comment
Share on other sites

I can't help you at the moment with mysql, but on the off chance you just want an SQL database and don't really care about all the powerful features of mysql in particular, it's very easy to get SQLite 3 going in T3D. I have a T3D branch on my github (github.com/ChrisCalef/T3D - sqlite) with only the files you need (look in source/console, or check the commit history).

But by all means keep us informed if you get an up to date mysql working, that would sure be nice!

Link to comment
Share on other sites

Hi, thanks for your reply.

I don't really need much power in the DB, but I do need a shared database, and sqllite is embedded, is it not?

IE, I am making a multiplayer game, which may have (hopefully :P) a relatively large number of people accessing the database regularly, and transferring a relatively large amount of data. From what I've read about sqlite, it doesn't like to be used in this way, is that correct?

Link to comment
Share on other sites

I have this working now, I used ODBC in the end, and this site gave me some sample code which I used:


I will clean it up a bit and add some script helper functions, and then post it on my site. I think mySQL is a pretty vital resource to have in any serious engine, so it would be good to get some exposure for it. sqlLite is great for single player data storage but for heavy duty databases, MMO's, RPG's, etc etc, it's not really optimal at all.

I made a post about it on my site here:


Link to comment
Share on other sites

Hey, right on, glad you figured it out, and thanks for sharing! Yeah, I didn't think SQLite would help, because you're right, it's mainly for local data, that's what I use it for. I guess in a pinch you could run it embedded in your dedicated server build... but mysql is clearly much better, and yeah it would help T3D a lot to have a ready resource for it.

Good luck with your game, look forward to hearing about it!

Link to comment
Share on other sites

Thanks for your reply! Yeah, I briefly considered using sqlite in a dedicated server build, (since I will be doing the same thing with mySQL anyway for licensing and security reasons) but I thought mySQL would be the "correct" way to do this.

I finished my (admittedly basic) implemenation, the instructions are on my blog here:


and the file itself is here:


Hopefully that will be of some use to someone!

Link to comment
Share on other sites

I have noticed a fairly major oversight with this in that I didn't add any container class to expose the results of the mySQL queries to script.

What would be the best way of doing this?

I need to convert the sql statement containing, potentially, many rows from the database into a data structure that I can access and parse quickly from script.

I am guessing a custom class using a vector would be the correct approach here, but how do I expose that vector to script, so that I can do something like:


%row = resultset.getrow(%i)

Any ideas?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...