Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

"The application was unable to start correctly (0xc000007b)" while connecting to a database (1 reply)

$
0
0
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

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>