Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I need your help for connecting to MySql database via C++.
I downloaded xammp, it is working properly. I have mysql libraries, etc. under xammp.
i can easily reach to the database via php code.
i try to use c++ and in c++ code i have:

#include "my_global.h" 
#include "mysql.h"


But when i try to use C++ for this purpose i have the error:

Cannot open include file: 'mysql.h': No such file or directory<br />
Cannot open include file: 'my_global.h': No such file or directory<br />

However, i can see those files under mysql include directory.
Any help please?
Thanks...
Posted
Updated 25-Dec-11 22:25pm
v2

1 solution

Hi,

Hope this link will give you an idea

http://forums.mysql.com/read.php?45,49606,49606#msg-49606[^]

Thanks
 
Share this answer
 
v4
Comments
mstftrn 26-Dec-11 5:11am    
thanks..
But when i include the mysql include path program gives 103 errors; one, for ex, is:
c:\program files\microsoft sdks\windows\v6.1\include\mprapi.h(1374) : error C2143: syntax error : missing ';' before '__stdcall'
i could not understand the reason...
Any idea,
thanks again
Satheesh1546 26-Dec-11 5:33am    
Do u included the following libraries.
wsock32.lib mysqlclient.lib libmysql.lib mysys.lib
mstftrn 26-Dec-11 11:04am    
yes i included. i am using visual studio 2008 (sorry for latency)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900