关于 make 的错误

关于 make 的错误

我想在 Ubuntu 15.04 上使用 DDC 卡 1553-MIL-STD。

我在制作项目时出现以下错误。我该怎么办?

root@rdp-OptiPlex-9020:/home/rdp/DDC/BU69092S1_3_13_0/samples/emacepl/prj# make

================================================================
Remove Samples and ddc_os_lib_util
================================================================
rm -f ddc_os_lib_util.o
rm -f ../bin/test.vec
for prog in aesdemo aio bcasync bcasync2 bcdbuf bcdemo bcei bcimr bcmemobj bcmrt bcmrtmti bcmti bcopcode bctime datarray datastrm dbcdemo dio dioall irigdemo looptest mrtdemo mrtei mrtimr mrtmti mti2disk mti2dsk2 mtidemo mtiedemo mtiread mtiread2 mtirq mtpoll replaydemo resptime rtdataarray rtdbuf rtirq rtmode rtmtdemo rtmtidemo rtpoll tester trgdio trigger voltage; do \
    rm -f ../bin/$prog; \
done

================================================================
Build Samples
================================================================
mkdir -p ../bin
gcc -Wall -m64 -I/usr/include/emacepl -I/usr/include/ddcacex -I/usr/include/ddcacex/os/lib_support -DLINUX -DDDC_LINUX_THREAD -lpthread -lemacepl -c /usr/include/ddcacex/os/lib_support/ddc_os_lib_util.c -o ddc_os_lib_util.o
gcc -Wall -m64 -I/usr/include/emacepl -I/usr/include/ddcacex -I/usr/include/ddcacex/os/lib_support -DLINUX -DDDC_LINUX_THREAD -lpthread -lemacepl ../src/aesdemo/aesdemo.c -o ../bin/aesdemo ddc_os_lib_util.o  -I/usr/include/emacepl -I/usr/include/ddcacex -I/usr/include/ddcacex/os/lib_support -DLINUX -DDDC_LINUX_THREAD -lpthread -lemacepl 
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libemacepl.so when searching for -lemacepl
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libemacepl.a when searching for -lemacepl
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libemacepl.so when searching for -lemacepl
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libemacepl.a when searching for -lemacepl
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../libemacepl.so when searching for -lemacepl
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../libemacepl.a when searching for -lemacepl
/usr/bin/ld: skipping incompatible /usr/lib/libemacepl.so when searching for -lemacepl
/usr/bin/ld: skipping incompatible /usr/lib/libemacepl.a when searching for -lemacepl
/usr/bin/ld: cannot find -lemacepl
collect2: error: ld returned 1 exit status
Makefile:109: recipe for target 'aesdemo' failed
make: *** [aesdemo] Error 1
root@rdp-OptiPlex-9020:/home/rdp/DDC/BU69092S1_3_13_0/samples/emacepl/prj# 

答案1

当编译源代码时,-l指的是您的项目应该链接的库。

在您的示例中,makefile 尝试构建'aesdemo'并需要链接'emacepl'库,但找不到它。

cannot find -lemacepl

要么没有安装,要么在(makefile 寻找不同库的地方)'emacepl'中找不到。LD_LIBRARY_PATH

相关内容