Mysql
-
Hallo
ich habe ein Problem bein include von mysql.h
mein Programm sieht bisher so aus:
#include <iostream> #include <mysql.h> using namespace std; int main() { int x=5; cout<<x; return 0; }
aber ich bekomme trotzdem folgende Fehlermeldung:
**** Incremental build of configuration Debug for project mysql **** make -k all 'Building file: ../main.cpp' 'Invoking: GCC C++ Compiler' g++ -I"C:/mysql/include" -O0 -g3 -Wall -c -fmessage-length=0 -omain.o ../main.cpp In file included from C:/mysql/include/mysql.h:57, from ../main.cpp:2: C:/mysql/include/mysql_com.h:183: error: `SOCKET' does not name a type C:/mysql/include/mysql_com.h:347: error: `SOCKET' was not declared in this scope C:/mysql/include/mysql_com.h:347: error: expected primary-expression before "const" C:/mysql/include/mysql_com.h:347: error: expected primary-expression before "unsigned" C:/mysql/include/mysql_com.h:348: error: expected primary-expression before "unsigned" C:/mysql/include/mysql_com.h:348: error: initializer expression list treated as compound expression make: *** [main.o] Error 1 make: Target `all' not remade because of errors. Build complete for project mysql
ich habe den mysql server mit den includes installiert.
wollte eigentlich mysql++ runterladen und compilieren, aber das hat nicht geklappt.
die mysql library binde ich schon ins projekt ein.
verwende eclipse mit cdt und mingw.
hoffe mir kann jemand helfen
danke schon mal
mfg
silicore
-
#include mal vor der <mysql.h> die <winsock2.h>
-
danke, hat geklappt.
mfg silicore
-
Dieser Thread wurde von Moderator/in HumeSikkins aus dem Forum C++ in das Forum Compiler-Forum verschoben.
Im Zweifelsfall bitte auch folgende Hinweise beachten:
C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?Dieses Posting wurde automatisch erzeugt.