Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 20:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Help ^^

Discussion on Help ^^ within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2009
Posts: 92
Received Thanks: 7
Smile Help ^^

Hi

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:river *driver;
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 ^^
oiakrap is offline  
Old 02/17/2013, 23:11   #2
 
elite*gold: 0
Join Date: Feb 2013
Posts: 139
Received Thanks: 15
weird =S il see what i can find
FinestBoosterNA is offline  
Old 02/18/2013, 00:37   #3
 
elite*gold: 0
Join Date: Oct 2009
Posts: 92
Received Thanks: 7
ok
oiakrap is offline  
Old 02/18/2013, 02:43   #4
 
ernilos's Avatar
 
elite*gold: 20
Join Date: Jan 2012
Posts: 766
Received Thanks: 645
Why you dont use C connectors? I work better than c++ and it's more easy...
ernilos is offline  
Old 02/18/2013, 03:24   #5
 
elite*gold: 0
Join Date: Oct 2009
Posts: 92
Received Thanks: 7
ernilos still could not get the error DecryptGamePacket but still keep trying. from mistakes is that you learn. but I'm almost discovering =D
oiakrap is offline  
Old 02/20/2013, 23:55   #6
 
elite*gold: 0
Join Date: Oct 2009
Posts: 92
Received Thanks: 7
plz close ^^
oiakrap is offline  
Reply




All times are GMT +1. The time now is 20:14.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.