Witam.
Mam problem, gdyż wyskakuję błąd LNK2019. Kod napisany w Visual Basic 2019. Bardzo bym prosił o odpowiedź co jest nie tak.
Pozdrawiam.
#include <windows.h>
#include <mysql.h>
#include <iostream>
#include <string>
using namespace std;
int main()
{
MYSQL* conn;
MYSQL_ROW row;
MYSQL_RES* res;
const string host = "localhost";
const string user = "root";
const string pass = "";
const string db = "test";
unsigned int port = 3306;
conn = mysql_init(0);
if (conn) { //if good
cout << "Working" << endl;
}
else { //if not good
cout << "Not working" << endl;
}
conn = mysql_real_connect(conn, host.c_str(), user.c_str(), pass.c_str(), db.c_str(), port, NULL, 0);
if (conn) { //if good
cout << "Working" << endl;
}
else { //if not good
cout << "Not working" << endl;
}
return 0;
}