Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

How to link mysql library with the c++ program?

Codes here !

Moderators: macek, egami, gesf

How to link mysql library with the c++ program?

Postby Antrikssh » Mon Jun 04, 2012 8:24 pm

Hi,

I have used created my database application in c++ by using mysql connector c++. Now make a wrapper file, so that I will use use that in my php web appliction. For wrapping it I have used SWIG, but when I complie it with the command that mention below

[root]# c++ -fpic -c Test_wrap.cpp DBConn.cpp -I/usr/include/php/Zend/ -I/usr/include/php/TSRM/ -I/usr/include/php/main -I/usr/include/php/

DBConn.h:130:9: error: ‘Driver’ does not name a type
DBConn.h:131:9: error: ‘Connection’ does not name a type
DBConn.h:132:9: error: ‘Statement’ does not name a type
DBConn.h:133:9: error: ‘PreparedStatement’ does not name a type
DBConn.h:134:3: error: ‘ResultSet’ does not name a type


I got the above error.

So please tell me how to link with mysql library from cli because I tried it so much.

Thanks,

Antrikssh.
Antrikssh
New php-forum User
New php-forum User
 
Posts: 22
Joined: Wed May 02, 2012 5:27 am

Re: How to link mysql library with the c++ program?

Postby NigelRen » Fri Jun 15, 2012 1:28 pm

This is more a forum about using PHP and MySQL, you would be better off finding a c++ forum for this query I think.
NigelRen
php-forum Active User
php-forum Active User
 
Posts: 450
Joined: Fri Aug 05, 2011 9:53 am


Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.