How can I solve this ? error: unable to find library -lmysqlclient
How can I solve this ? error: unable to find library -lmysqlclient
我想为我的程序编译,但我被困在这里,我正在使用 freebsd 12.1 和 gcc++6.4 + gnu gmake -j20 comand
当前路径
# mysql
INCDIR += -I../../../extern/mysql
LIBDIR += -L/usr/local/lib/mysq
LIBS += -lmysqlclient -lz -pthread -lm -lssl -lcrypto
### END
腻子错误
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 #
我编辑了打字错误,现在我收到了
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 #
您在 LIBDIR += -L/usr/local/lib/mysq
中有错字 - 缺少 l
。
确保安装了 mysql57-client
包。如果没有,运行 pkg install mysql57-client
.
此外,/usr/src
dir通常用于存放FreeBSD源代码。用它来存储您自己的代码不是一个好主意。
我想为我的程序编译,但我被困在这里,我正在使用 freebsd 12.1 和 gcc++6.4 + gnu gmake -j20 comand
当前路径
# mysql
INCDIR += -I../../../extern/mysql
LIBDIR += -L/usr/local/lib/mysq
LIBS += -lmysqlclient -lz -pthread -lm -lssl -lcrypto
### END
腻子错误
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 #
我编辑了打字错误,现在我收到了
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 #
您在 LIBDIR += -L/usr/local/lib/mysq
中有错字 - 缺少 l
。
确保安装了 mysql57-client
包。如果没有,运行 pkg install mysql57-client
.
此外,/usr/src
dir通常用于存放FreeBSD源代码。用它来存储您自己的代码不是一个好主意。