MySQL Forums
Forum List  »  Connector/C++

"The application was unable to start correctly (0xc000007b)" while connecting to a database
Posted by: Guy Shen
Date: July 14, 2010 10:11AM

Hey fellas.
I'm trying to connect my MySQL database using C++ connector.
I've done the next so far:
1.Installed the connector
2. Created a new project
3. Configured it as Active(Release)
4. In properties, under C/C++ -> General -> Additional Include Directories, I've added the connector's "include" folder
5. In Linker -> General -> Additional Libary Directories, I've added the "lib/opt" subfolder.
6. I've also added "mysqlcppconn.lib" under Linker -> Input -> Additional Dependencies
7/ I've copied "mysqlcppconn.dll" into the .exe folder

After all of this, I tried running this simple code:
---------------------------------------------------
#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)
{ sql:: driver *driver;
sql::Connection *con;
driver = get_driver_instance();
con = driver->connect("tcp://127.0.0.1:3306", "root", "root");
}
----------------------------------------------------

But I just keeping getting this error:
"The application was unable to start correctly (0xc000007b)"

Any ideas ?
Thanks ahead

Options: ReplyQuote


Subject
Views
Written By
Posted
"The application was unable to start correctly (0xc000007b)" while connecting to a database
11265
July 14, 2010 10:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.