MySQL XCode C++ Connector Bad Access code=13

2019-08-08 02:04发布

问题:

I have a problem with getting MySQL working with my code. I get the EXC_BAD_ACCESS(code=EXC_i386_GPFLT) error on the connect line.

The code is the following:

 try {

     driver =sql::mysql::get_driver_instance();
     connection = driver->connect("tcp://127.0.0.1:3306/", "root", "");

I've seen the post MySQL Connector/C++ OS X 10.9 Mavericks and XCODE 5.0.2 but I can't do the same thing because I use a bunch of libraries that were linked the same way, and they are more difficult to configure in Xcode then probably adding MySQL to my project.