hello world !
i'have always this error when i compile this prog:
//----------------------------------------------------------------------------------------------------
In file included from C:/Dev-Cpp/include/MySQL/mysql.h:57,
from mysqliostream.cpp:3:
C:/Dev-Cpp/include/MySQL/mysql_com.h:116:
error: 'SOCKET' is used as a type,
but is not defined as a type.
C:/Dev-Cpp/include/MySQL/mysql_com.h:180:
error: SOCKET' was not declared in this scope
C:/Dev-Cpp/include/MySQL/mysql_com.h:180: error: syntax error before,' token make.exe: *** [mysqliostream.o] Error 1
//----------------------------------------------------------------------------------------------------
this is my prog:
Thanks for the solution @Nobody/Anonymous.I included <windows.h> and the libraries error cleared, but my program now crashes when I compile and run it.Any idea how I could resolve that?
hello world !
i'have always this error when i compile this prog:
//----------------------------------------------------------------------------------------------------
In file included from C:/Dev-Cpp/include/MySQL/mysql.h:57,
from mysqliostream.cpp:3:
C:/Dev-Cpp/include/MySQL/mysql_com.h:116:
error: 'SOCKET' is used as a type,
but is not defined as a type.
C:/Dev-Cpp/include/MySQL/mysql_com.h:180:
error:
SOCKET' was not declared in this scope C:/Dev-Cpp/include/MySQL/mysql_com.h:180: error: syntax error before
,' token make.exe: *** [mysqliostream.o] Error 1//----------------------------------------------------------------------------------------------------
this is my prog:
include <iostream>
include <MySQL/mysql.h>
using namespace std;
int main()
{
MYSQL mysql;
mysql_init(&mysql);
char v1;
int v2;
char v3;
char v4;
char v5;
cout << "server"<<endl;
cin >> v1;
cout << "port"<<endl;
cin >> v2;
cout << "login"<<endl;
cin >> v3;
cout << "pass"<<endl;
cin >> v4;
cout << "base"<<endl;
cin >> v5;
}
can any one help me please
thefaycal@yahoo.fr
try adding #include <windows.h> before the other includes, I think maybe even in a console app mysql needs some of the things defined by windows.
Thanks for the solution @Nobody/Anonymous.I included <windows.h> and the libraries error cleared, but my program now crashes when I compile and run it.Any idea how I could resolve that?