A good MySQL wrapper for c++?

Discussion about everything. New games, 3d math, development tips...
Post Reply
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

A good MySQL wrapper for c++?

Post by Halan »

I dont know which to use...

i tried the one you find at this link
http://www.alhem.net/project/mysql/index.html

but i cant compile it cause im using dev-cpp and the project file is a .dsp file.

can you tell me how to compile it with dev-cpp ( or another compiler but i only "learned" dev-cpp so you have to give me a quick tut)

greets,
Halan
rich_diggins
Posts: 1
Joined: Sat Sep 23, 2006 3:06 pm
Location: West Coast

Post by rich_diggins »

what about the example that they give?
http://www.alhem.net/project/mysql/examples.html


just open Dev-cpp and start a new console project....
copy and paste code from examples into new main.cpp

make sure that all your paths are correct... that the headers and cpp files are in the same folder...

then, if you want to link to irrlicht as well, make sure you have include/library paths specified in the properties of the project you created.

looks easy... ask if you have more problems...
TheC
Posts: 93
Joined: Fri May 05, 2006 7:50 am

Post by TheC »

is OO important?

It is possible to use the C version of mysql.
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

the point is you have to compile the source code oyu can download there first with an inlcuded visiual studio project and i jsut cant compile it cause i dont have "config-win.h" on my computer.

just try it out to see what i mean or maybe you can compile hte file and give it to me ;)
AaronA
Posts: 55
Joined: Tue Sep 12, 2006 1:31 am

Post by AaronA »

Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

well i decided to just use the C API

but when i include <mysql.h> i get some error message (i think its c related but i dont know what to dO)
c:\users\kai\documents\dsa game\inlcude_mysql\mysql_com.h(184) : error C2146: syntax error : missing ';' before identifier 'fd'
c:\users\kai\documents\dsa game\inlcude_mysql\mysql_com.h(184) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\users\kai\documents\dsa game\inlcude_mysql\mysql_com.h(184) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
greets,
halan
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

also now im getting errors using irrlicht:
C:\Program Files\Microsoft Visual Studio 8\VC\include\vcclr.h(44) : warning C4365: 'initializing' : conversion from 'int' to 'unsigned int', signed/unsigned mismatch
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(20) : warning C4244: 'return' : conversion from 'int' to 'irr::s16', possible loss of data
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(36) : warning C4244: 'return' : conversion from 'int' to 'irr::s16', possible loss of data
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(46) : warning C4244: 'return' : conversion from 'irr::u32' to 'irr::u16', possible loss of data
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(56) : warning C4365: 'return' : conversion from 'int' to 'irr::u32', signed/unsigned mismatch
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(66) : warning C4365: 'return' : conversion from 'unsigned int' to 'irr::s32', signed/unsigned mismatch
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(176) : warning C4365: '=' : conversion from 'unsigned int' to 'irr::s32', signed/unsigned mismatch
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(181) : warning C4365: '=' : conversion from 'unsigned int' to 'irr::s32', signed/unsigned mismatch
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(186) : warning C4365: '=' : conversion from 'unsigned int' to 'irr::s32', signed/unsigned mismatch
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(190) : warning C4365: 'argument' : conversion from 'const irr::s32' to 'irr::u32', signed/unsigned mismatch
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(190) : warning C4365: 'return' : conversion from 'irr::u16' to 'irr::s16', signed/unsigned mismatch
c:\users\kai\documents\dsa game\include_irrlicht\SColor.h(199) : warning C4365: 'return' : conversion from 'unsigned int' to 'irr::s32', signed/unsigned mismatch
c:\users\kai\documents\dsa game\include_irrlicht\SLight.h(65) : warning C4820: 'irr::video::SLight' : '3' bytes padding added after data member 'irr::video::SLight::CastShadows'
greets,
halan
Post Reply