Hallo mal!
Ich habe für die Schule die Aufgabe bekommen, eine MySQL Verbindung mit C++ zu einer Datenbank zu erstellen. Ich verwende die IDE Dev-C++ 4.9.9.2. Nachdem ich einiges programmiert habe und die erforderlichen Bibliotheken inkludiert habe, bekomme ich folgende Fehlermeldungen:
Meldung
File format not recognized
Id returned 1 exit status
C:\Schule\5BI\PPM\Makefile.win [Build Error] [Projekt 1.exe] Error 1
Wie kann ich diese Fehler lösen, soll ich noch das Kompilier Log posten?
MfG
StormsoN
Ich habe für die Schule die Aufgabe bekommen, eine MySQL Verbindung mit C++ zu einer Datenbank zu erstellen. Ich verwende die IDE Dev-C++ 4.9.9.2. Nachdem ich einiges programmiert habe und die erforderlichen Bibliotheken inkludiert habe, bekomme ich folgende Fehlermeldungen:
Code:
#include <iostream>
#include <windows.h>
#include <conio.h>
#include "mysql.h"
#include "conection.h"
using namespace std;
string msg[5];
string input_str;
int input_int;
con_info conection;
MYSQL my_sql;
void init()
{
msg[0] = "192.168.20.44";
msg[1] = "80";
msg[2] = "ams";
msg[3] = "titp4td";
msg[4] = "ams";
for(int i=0;i<5;i++)
{
cout << msg[i] << ": ";
switch(i)
{
case 0:
cin >> input_str;
conection.set_host(input_str);
input_str = "";
break;
case 1:
cin >> input_int;
conection.set_port(input_int);
input_int = 0;
break;
case 2:
cin >> input_str;
conection.set_user(input_str);
input_str = "";
break;
case 3:
cin >> input_str;
conection.set_pass(input_str);
input_str = "";
break;
case 4:
cin >> input_str;
conection.set_db(input_str);
input_str = "";
break;
}
}
system("cls");
if(mysql_real_connect(&my_sql,conection.get_host().c_str(),conection.get_user().c_str(),conection.get_pass().c_str(),conection.get_db().c_str(),conection.get_port(),NULL,0))
{
cout << "Verbindung wurde hergestellt.";
Sleep(1000);
}
else
{
cout << "Verbindung konnte nicht hergestellt werden!\n\n";
cout << conection.get_host() << "\n";
cout << conection.get_port() << "\n";
cout << conection.get_user() << "\n";
cout << conection.get_pass() << "\n";
cout << conection.get_db() << "\n";
}
}
int main(string argv[])
{
init();
mysql_close(&my_sql);
getch();
return 0;
}
Meldung
File format not recognized
Id returned 1 exit status
C:\Schule\5BI\PPM\Makefile.win [Build Error] [Projekt 1.exe] Error 1
Wie kann ich diese Fehler lösen, soll ich noch das Kompilier Log posten?
MfG
StormsoN