简体   繁体   English

sql :: mysql :: get_driver_instance()找不到符号

[英]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. 我现在正尝试将mysql本机API链接到我的服务器软件...运气不好。 When compiling in Xcode on OSX10.9 using the flags 使用标志在OSX10.9上的Xcode中编译时

$(OTHER_CFLAGS) -I /usr/local/boost_1_55_0/ -I /usr/local/mysqlconn/include/ -I /usr/local/mysqlconn/lib/ $(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: 架构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) “ sql :: mysql :: get_driver_instance()”,引用自:SQLComm.o ld中的sql :: mysql :: get_mysql_driver_instance():未为体系结构x86_64 clang找到符号:错误:链接器命令失败,退出代码为1 (使用-v查看调用)

I really have no idea why though. 我真的不知道为什么。 The API files were downloaded by me today, and extracted at the included paths. 我今天下载了这些API文件,并从包含的路径中提取了这些文件。 I include all the files from include and include/cppconn in the server program that uses the function the linker cannot found. 我将服务器中包含include和include / cppconn的所有文件包含在使用链接器找不到的功能的服务器程序中。

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. 构建项目时,需要在库中链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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