当我运行make distcheck时,没有安装一个库(本例中为lib2),因为它需要lib1。
有没有办法强制安装图书馆的顺序?
Makefile.am:
lib_LTLIBRARIES = libTwo.la libOne.la
libOne_la_SOURCES = lib/one/example.cpp \
lib/one/example.h
libTwo_la_SOURCES = lib/two/Example2.cpp \
lib/two/Example2.h
libTwo_la_CPPFLAGS = -I$(srcdir)/lib/one
libTwo_la_LIBADD = libOne.la
我正在使用:
*编辑:*这是我在make distcheck输出中看到的内容。
/usr/bin/ld: cannot find -lOne
collect2: ld returned 1 exit status
libtool: install: error: relink `libTwo.la' with the above command before installing it
/bin/sh ./libtool --mode=install /usr/bin/install -c 'libOne.la' '/tmp/xx-x-yy-21346 /home/foo/commonlib-1.0/_inst/lib/libOne.la'
答案 0 :(得分:2)
尝试交换:
lib_LTLIBRARIES = libTwo.la libOne.la
有:
lib_LTLIBRARIES = libOne.la libTwo.la
lib_LTLIBRARIES
中的订单在安装时很重要。