我正在尝试使用autotools构建一个项目并收到此错误:
$ autoreconf --install
automake: warnings are treated as errors
src/Makefile.am:3: warning: variable 'librombrowser_a_LDFLAGS' is defined but no program or
src/Makefile.am:3: library has 'librombrowser_a' as canonical name (possible typo)
autoreconf: automake failed with exit status: 1
src / Makefile.am如下:
noinst_LIBRARIES = librombrowser.a
librombrowser_a_CPPFLAGS = $(GTK_CFLAGS)
librombrowser_a_LDFLAGS = $(GTK_LIBS)
librombrowser_a_SOURCES = \
rombrowser-app.c \
rombrowser-app.h \
rombrowser-cmds-file.c \
rombrowser-cmds-help.c \
rombrowser-cmds.h \
rombrowser-dirs.c \
rombrowser-dirs.h \
rombrowser-settings.c \
rombrowser-settings.h
bin_PROGRAMS = rombrowser
rombrowser_SOURCES = rombrowser.c
rombrowser_LDADD = librombrowser
我没有看到什么是错的。
答案 0 :(得分:8)
_LDFLAGS
对静态库无效,仅对可执行文件或共享库有效。您可能需要_LIBADD
。在我看来,错误信息可以改进。