error LNK2019 in mysql
look...
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")
#include <stdlib.h>
#include <iostream>
#include "mysql_connection.h"
#include "mysql_driver.h"
#include <cppconn/driver.h>
#include <cppconn/exception.h>
#include <cppconn/resultset.h>
#include <cppconn/statement.h>
using namespace std;
int main(void)
{
try
{
sql:
sql::Connection *con;
sql::Statement *stmt;
sql::ResultSet *res;
/* Create a connection */
driver = get_driver_instance();
con = driver->connect("tcp://localhost:3306", "root", "lols");
/* Connect to the MySQL test database */
con->setSchema("db");
stmt = con->createStatement();
res = stmt->executeQuery("SELECT 'Hello!' AS _message");
while (res->next())
{
std::cout << "\t... MySQL replies: "<< std::endl;
/* Access column data by alias or column name */
std::cout << res->getString("_message") << std::endl;
std::cout << "\t... MySQL says it again: "<< std::endl;
/* Access column fata by numeric offset, 1 is the first column */
std::cout << res->getString(1) << std::endl;
}
delete res;
delete stmt;
delete con;
}
catch (sql::SQLException &e)
{
std::cout << "# ERR: SQLException in " << __FILE__ << std::endl;
std::cout << "(" << __FUNCTION__ << ") on line " << __LINE__ << std::endl;
std::cout << "# ERR: " << e.what();
std::cout << " (MySQL error code: " << e.getErrorCode();
std::cout << ", SQLState: " << e.getSQLState() << " )" << std::endl;
}
std::cout << std::endl;
return EXIT_SUCCESS;
}
why this error happens?
I add the files SDL.lib and SDLmain.lib even more of that error LNK2019
plz help ^^






