Showing entries 1 to 1
Displaying posts with tag: error C2371 (reset)
Common Errors and Resolutions for Building your own MySQL or MariaDB C/C++ Program on Windows

In my previous post, Creating a basic C/C++ Program to Interact with MySQL and MariaDB, I ran into some errors along the way, so I wanted to share those and their resolutions.

1. fatal error C1083: Cannot open include file: ‘mysql.h’: No such file or directory

mysql1.c
mysql1.c(2) : fatal error C1083: Cannot open include file: 'mysql.h':
No such file or directory

At this point, my cl command was:

cl /I "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
mysql1.c

So I needed to include the directory that contained mysql.h as well. So the above changed to:

cl /I "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
/I "C:\Program Files\MySQL\MySQL Server 5.5\include" mysql1.c

2. error C2061: syntax error : identifier ‘SOCKET’

This was actually a small slew of simple syntax errors. I …

[Read more]
Showing entries 1 to 1