简体   繁体   中英

sql::mysql::get_driver_instance() Symbol not found

I'm trying to link the mysql native API to my server software now... With little luck. When compiling in Xcode on OSX10.9 using the flags

$(OTHER_CFLAGS) -I /usr/local/boost_1_55_0/ -I /usr/local/mysqlconn/include/ -I /usr/local/mysqlconn/lib/

I get the compiler/linker error:

Undefined symbols for architecture x86_64:
"sql::mysql::get_driver_instance()", referenced from: sql::mysql::get_mysql_driver_instance() in SQLComm.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I really have no idea why though. The API files were downloaded by me today, and extracted at the included paths. I include all the files from include and include/cppconn in the server program that uses the function the linker cannot found.

Any ideas what I am doing wrong?

I see you configuring include directories, but I don't see any libraries listed there.

You need to link in the library when you build your project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM