2014-05-10 69 views
6

我試圖使用自動工具,並收到此錯誤生成一個項目:庫,但沒有規範的名稱

$ 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 

我沒有看到有什麼問題。

回答

6

_LDFLAGS不適用於靜態庫,僅適用於可執行文件或共享庫。您可能需要改爲_LIBADD。在我看來,錯誤信息可以改善。