【发布时间】:2016-04-06 15:54:05
【问题描述】:
我在Eclipse 中创建了一个Yocto autotools 项目(基于Hello World 项目)。
我想将我的代码分成多个库,然后以静态库 (.a) 的形式将它们链接到我的项目。
现在我有一个应用程序和一些静态库。但是,无论我尝试什么,我都无法编译我的代码。每个单独的 lib 编译并生成一个 .a 文件,但我的应用程序没有。
在网上搜索后,我有一个可能的解决方案 - 添加一个指向我的静态库的直接链接:
MyApp_CPPFLAGS="-I$LOCATION"
MyApp_LDADD="/home/xxx/workspace/MyApp/Encoding2/Debug/libEncoding2.a"
这是我的Makefile.am 文件,其中libEncoding2.a 存在于该路径中。
我得到的错误是:
make[2]: *** No rule to make target `"/home/xxx/workspace/MyApp/Encoding2/Debug/libEncoding2.a"', needed by `MyApp'. Stop.
我已经构建了 lib,所以我不确定为什么需要 make try。
任何帮助将不胜感激。
【问题讨论】:
标签: eclipse static-libraries autotools yocto