Hallo,
Ik heb een probleem met de MySQL C++ API, ik krijg de volgende foutmeldingen als ik probeer te compilen met Microsoft Visual C++ .NET:
c:\mysql\include\mysql_com.h(116) : error C2146: syntax error : missing ';' before identifier 'fd'
c:\mysql\include\mysql_com.h(116) : error C2501: 'st_net::SOCKET' : missing storage-class or type specifiers
c:\mysql\include\mysql_com.h(116) : error C2501: 'st_net::fd' : missing storage-class or type specifiers
c:\mysql\include\mysql_com.h(180) : error C2065: 'SOCKET' : undeclared identifier
c:\mysql\include\mysql_com.h(180) : error C2146: syntax error : missing ')' before identifier 's'
c:\mysql\include\mysql_com.h(181) : error C2059: syntax error : ')'
Ik heb gezocht op Google en GoT zonder resultaat en ik heb ook niks kunnen vinden in de documentatie van MySQL zelf.
Hieronder is de code van het test programmaatje:
De project proporties heb ik ook allemaal ingesteld..
Ik heb een probleem met de MySQL C++ API, ik krijg de volgende foutmeldingen als ik probeer te compilen met Microsoft Visual C++ .NET:
c:\mysql\include\mysql_com.h(116) : error C2146: syntax error : missing ';' before identifier 'fd'
c:\mysql\include\mysql_com.h(116) : error C2501: 'st_net::SOCKET' : missing storage-class or type specifiers
c:\mysql\include\mysql_com.h(116) : error C2501: 'st_net::fd' : missing storage-class or type specifiers
c:\mysql\include\mysql_com.h(180) : error C2065: 'SOCKET' : undeclared identifier
c:\mysql\include\mysql_com.h(180) : error C2146: syntax error : missing ')' before identifier 's'
c:\mysql\include\mysql_com.h(181) : error C2059: syntax error : ')'
Ik heb gezocht op Google en GoT zonder resultaat en ik heb ook niks kunnen vinden in de documentatie van MySQL zelf.
Hieronder is de code van het test programmaatje:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| #include <stdio.h>
#include <mysql.h>
static MYSQL db;
int main()
{
if(!mysql_connect(&db, "root", NULL, "***"))
printf(mysql_error(&db));
else if(mysql_select_db(&db, "test"))
printf(mysql_error(&db));
return 0;
} |
De project proporties heb ik ook allemaal ingesteld..