没有规则可以创建目标... libm.a
当我尝试编译我的应用程序时,出现以下错误:
*** No rule to make target `/mypath/lib/libm.a', needed by `/myPath/bin/appName'
为什么链接器根据绝对路径查找 libm.a?
I get the following error when I try to compile my app:
*** No rule to make target `/mypath/lib/libm.a', needed by `/myPath/bin/appName'
Why is the linker looking for libm.a according to an absolute path?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我开始考虑将编程转为通灵职业......
因为你告诉他这样做。您很可能已经输入了
哎呀!您需要“system”
libm.a
(这是一个数学库,glibc 的一部分),但make
认为您需要自己的静态库。然后它添加了正确的前缀,但没有找到任何规则来重新创建libm.a
。解决方案可能是将
libm.a
移出先决条件。这就是配置脚本或特殊make sanity
目标检查系统库是否存在的目的。I start thinking of swithcing programming to psychic career...
Because you told him to do so. Most likely you've typed
Whoops! You need "system"
libm.a
(that's a math library, a part of glibc), butmake
thinks that you need your own static library. It then adds the proper prefix and doesn't find any rule to remakelibm.a
.A solution could be moving
libm.a
out of prerequisites. That's the purpose of configure script or a specialmake sanity
target to check the existence of system libraries.