c - Eclipse -lcurl 找不到

标签 c linux eclipse libcurl

我需要一个特殊的编译器。这是我从 eclipse 发出的电话:

powerpc-stw-linux-uclibc-g++ -L/usr/lib/i386-linux-gnu -L/usr/lib -L/usr/libx32 -L/var/lib -o "Test"  ./src/Test.o   -lz -lcurl

但是现在 Eclipse 抛出这个:

/opt/powerpc-gcc-4.4.3-uclib/bin/../lib/gcc/powerpc-stw-linux-uclibc/4.4.3/../../../../powerpc-stw-linux-uclibc/bin/ld: skipping incompatible /usr/lib/i386-linux-gnu/libcurl.so when searching for -lcurl
/opt/powerpc-gcc-4.4.3-uclib/bin/../lib/gcc/powerpc-stw-linux-uclibc/4.4.3/../../../../powerpc-stw-linux-uclibc/bin/ld: skipping incompatible /usr/lib/i386-linux-gnu/libcurl.a when searching for -lcurl
/opt/powerpc-gcc-4.4.3-uclib/bin/../lib/gcc/powerpc-stw-linux-uclibc/4.4.3/../../../../powerpc-stw-linux-uclibc/bin/ld: cannot find -lcurl

我尝试在 Ubuntu 14.04 x86 下编译。应该安装 libcurl

$ curl-config --libs
-L/usr/lib/i386-linux-gnu -lcurl

最佳答案

显然,您正在为 PowerPC 构建,但与 i386 的库链接。

您需要下载/构建 PowerPC 的 libcurl,并提供正确的路径。

换句话说,不要混合使用两种不同的架构。

关于c - Eclipse -lcurl 找不到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32503965/

相关文章:

c - Unicode 和命令提示符 (Windows)

c++ - "Undefined Behavior"真的允许*任何事情*发生吗?

linux - 通过 Linux bash 读取远程文件并使用远程机器本身的内容

linux - 如何将 -I 和 -n 与 xargs 结合起来?

Java如何将字符串数组中的小写字符串值转换为大写字符串

c - 在C代码中,自由功能无法将内存清除掉

c - 使用 XtPointer 传递 int 是否安全?

c++ - 包含来自 CUDA 10.0 的 npps.h 时发生链接错误

java - 如何通过eclipse将postgres连接到heroku?

Java 文件在 eclipse 中运行,但在命令行上运行