fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory

I'm using Vc++ pro. I have installed MySql and set the include directory

C:\Program Files\MySQL\include\

in my project directory, that include folder does have mysql.h so I can't figure this out, anyone got an idea?

4
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Salem

ave you tried copying the mysql.h file to vc++'s include folder?

Maybe you could add it to your INCLUDE environment variables in Windows
(Note: exact sequence here may be different on WinXP/Vista ... i'm using Win2K)

• Right-click on My Computer and choose Properties
• Go to the Advanced tab, and press the button for Environment Variables.
• Scroll down the list of system variables, and look for the one called INCLUDE

the variable will look something like this...

d:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\

so it'll look more like..

d:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\ [B]; C:\Program Files\MySQL\include\ [/B]

You might need to restart for it to take effect... but after that, try compiling it again :)

Or just put that path into the project settings.