简体   繁体   English

在自动工具项目中,如何指定库的安装顺序?

[英]In an autotools project how do I specify the installation order of libraries?

I find this issue is seen only when I am building shared libraries. 我发现只有在构建共享库时才会看到此问题。

Here is the exact issue: In main.mk: 这是确切的问题:在main.mk中:

lib_LTLIBRARIES += libone.la
libone_la_LIBADD = 

In dir-one/automake.mk: 在dir-one / automake.mk中:

...
libone_la_LIBADD += libtwo.la
...

In dir-two/automake.mk: 在dir-two / automake.mk中:

...
libone_la_LIBADD += libthree.la
...

In Makefile.am: 在Makefile.am中:

include main.mk
include dir-one/automake.mk
include dir-two/automake.mk

While make runs fine, make install complains that linker cannot find -ltwo and -lthree . 尽管make运行正常,但make install抱怨链接器找不到-ltwo-lthree

So: 所以:

lib_LTLIBRARIES += libthree.la libtwo.la libone.la

should give you the right install order. 应该给您正确的安装顺序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM