We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
遇到了这个issues中同样的问题,加入链接-lcurl后仍然报错
#8 undefined symbol: curl_easy_escape
undefined symbol: curl_easy_escape
已解决,在这里补充一下,链接的时候要把-lcurl加在后面,像这样: cc -g -O2 -Wall -Iskynet/3rd/lua -fPIC --shared -Iserver/lualib-src/webclient server/lualib-src/webclient.c -o server/luaclib/webclient.so -lcurl 如果是这样把链接库选项加在中间则会报错: cc -g -O2 -Wall -Iskynet/3rd/lua -fPIC --shared -Iserver/lualib-src/webclient -lcurl server/lualib-src/webclient.c -o server/luaclib/webclient.so
cc -g -O2 -Wall -Iskynet/3rd/lua -fPIC --shared -Iserver/lualib-src/webclient server/lualib-src/webclient.c -o server/luaclib/webclient.so -lcurl
cc -g -O2 -Wall -Iskynet/3rd/lua -fPIC --shared -Iserver/lualib-src/webclient -lcurl server/lualib-src/webclient.c -o server/luaclib/webclient.so
附一个参考makefile:
include platform.mk LUA_CLIB_PATH ?= server/luaclib LUA_CLIB = webclient CFLAGS = -g -O2 -Wall -I$(LUA_INC) $(MYCFLAGS) # lua LUA_STATICLIB := skynet/3rd/lua/liblua.a LUA_LIB ?= $(LUA_STATICLIB) LUA_INC ?= skynet/3rd/lua all : \ $(foreach v, $(LUA_CLIB), $(LUA_CLIB_PATH)/$(v).so) $(LUA_CLIB_PATH)/webclient.so : server/lualib-src/webclient.c | $(LUA_CLIB_PATH) $(CC) $(CFLAGS) $(SHARED) -Iserver/lualib-src/webclient $^ -o $@ -lcurl
可关闭该issues或保留作为参考
The text was updated successfully, but these errors were encountered:
谢谢 看样我要补一个makefile才好
Sorry, something went wrong.
No branches or pull requests
遇到了这个issues中同样的问题,加入链接-lcurl后仍然报错
#8
undefined symbol: curl_easy_escape
已解决,在这里补充一下,链接的时候要把-lcurl加在后面,像这样:
cc -g -O2 -Wall -Iskynet/3rd/lua -fPIC --shared -Iserver/lualib-src/webclient server/lualib-src/webclient.c -o server/luaclib/webclient.so -lcurl
如果是这样把链接库选项加在中间则会报错:
cc -g -O2 -Wall -Iskynet/3rd/lua -fPIC --shared -Iserver/lualib-src/webclient -lcurl server/lualib-src/webclient.c -o server/luaclib/webclient.so
附一个参考makefile:
可关闭该issues或保留作为参考
The text was updated successfully, but these errors were encountered: