问题
I've upgraded to XCode 5.0.2 along with OS X 10.9 Mavericks and MYSQL 5.6.16 recently. Has anyone had any luck getting the MySQL Connector/C++ to compile and work properly with this setup?
I've been linking with the distributed MySQL Connector/C++ library under Snow Leopard with no problem for a few years now, but when I shifted to the above mentioned setup, I have no luck.
When I use the sql::Driver->connect I get EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
USING:
- XCode 5.0.2
- Mavericks 10.9.2
- MYSQL server 5.6.16 Mac OS X 10.7 (x86, 64-bit), DMG Archive
- MYSQL Connector/C++ Mac OS X 10.7 (x86, 64-bit), Compressed TAR Archive
- Boost 1.55
I saw the following post: MySQL Connector/C++ BAD ACCESS crash
So tried I downloading the MYSQL Connector/C++ source 1.1.3 and managed to get the 'static_test' subprogram to work, but the other tests fail with the same sql::Driver->connect returning NULL.
Anybody?
回答1:
OK resolved.
The following post is the same problem:
MySQL Connector/C++ BAD ACCESS crash
Just in case someone else has this situation:
- I downloaded the MYSQL Connector/C++ source 1.1.13 and CMake
- I used the following command line to create a XCode project: cmake -G Xcode
- Compiled everything in XCode
- Copied the created libs into the mysqlconn/lib directory
来源:https://stackoverflow.com/questions/22280499/mysql-connector-c-os-x-10-9-mavericks-and-xcode-5-0-2