1
votes

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?

1

1 Answers

1
votes

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.