GCC找不到curl库 [英] GCC can't find curl library
问题描述
我有一个Dragino云盾(这是一个Arduino运基本上运行的OpenWrt Linino)和我已经安装GCC就可以按如下说明:
I have a Dragino Yun Shield (it's an Arduino Yun basically, running OpenWRt Linino) and I have installed GCC on it as explained here:
HTTP: //www.sniff.org.uk/2014/05/building-gcc-for-yun-in-12-not-easy.html
编译器似乎好工作我的需要(除了某些浮点警告),但我遇到一个问题。我的C程序需要curl库,它不能被链接器找到:
The compiler seems to work fine for my needs (except for some floating point warnings) but I run into a problem. My C program requires the curl library and it can't be found by the linker:
gcc -shared -fPIC kii_cloud.c kii_custom.c kii_prv_utils.c -L jansson -I curl -I jansson -l jansson -l curl -o libkii.so
/mnt/sda1/gcc/bin/ld: cannot find -lcurl
collect2: ld returned 1 exit status
make: *** [build] Error 1
但安装软件包的libcurl:
but the package libcurl is installed:
> opkg files libcurl
Package libcurl (7.29.0-1) is installed on root and has the following files:
/usr/lib/libcurl.so.4
/usr/lib/libcurl.so.4.3.0
似乎没有可用的libcurlX-dev软件包(如大的Linux发行版)。
It seems there's no libcurlX-dev package available (as in big Linux distros).
有什么办法解决这一问题?是/usr/lib/libcurl.so链接器想要什么?
Is there any way to fix this? Is /usr/lib/libcurl.so what the linker wants?
最好的问候和感谢。
推荐答案
我解决它通过创建符号链接如下:
I solved it by creating a symbolic link as follows:
cd /usr/lib
ln -s libcurl.so.4.3.0 libcurl.so
最好的问候
这篇关于GCC找不到curl库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!