[英]How can I solve this ? error: unable to find library -lmysqlclient
I want to compile for my program and I am stuck here, I am usig freebsd 12.1 and gcc++6.4 + gnu gmake -j20 comand我想为我的程序编译,我被困在这里,我正在使用 freebsd 12.1 和 gcc++6.4 + gnu gmake -j20 命令
Curent path当前路径
# mysql
INCDIR += -I../../../extern/mysql
LIBDIR += -L/usr/local/lib/mysq
LIBS += -lmysqlclient -lz -pthread -lm -lssl -lcrypto
### END
Error in putty腻子错误
root@vps:/usr/src/Sursa/Server/source/game/src # gmake -j20
linking ../game
ld: error: unable to find library -lmysqlclient
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:228: ../game] Error 1
root@vps:/usr/src/Sursa/Server/source/game/src #
root@vps:/usr/src/Sursa/Server/source/game/src #
I edited the typo and now i am geeting this我编辑了错字,现在我收到了
root@vps:/usr/src/Sursa/Server/source/game/src # gmake -j20
linking ../game
ld: error: /usr/local/lib/mysql/libmysqlclient.a(client.c.o) is incompatible with elf_i386_fbsd
ld: error: /usr/local/lib/mysql/libmysqlclient.a(libmysql.c.o) is incompatible with elf_i386_fbsd
ld: error: /usr/local/lib/mysql/libmysqlclient.a(crypt_genhash_impl.cc.o) is incompatible with elf_i386_fbsd
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:228: ../game] Error 1
root@vps:/usr/src/Sursa/Server/source/game/src #
You have a typo in LIBDIR += -L/usr/local/lib/mysq
- missing l
.您在
LIBDIR += -L/usr/local/lib/mysq
- missing l
中有错字。
Make sure you have mysql57-client
package installed.确保您已安装
mysql57-client
package。 If not, run pkg install mysql57-client
.如果没有,请运行
pkg install mysql57-client
。
Also, /usr/src
dir is usually used to store FreeBSD source code.此外,
/usr/src
目录通常用于存储 FreeBSD 源代码。 It is not a best idea to use it to store your own code.使用它来存储您自己的代码并不是一个好主意。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.