2013-05-15 36 views
2

我試圖在Cygwin中使用LAME(3.99.5)在MP3支持中構建SoX(14.4.1)。我一直在遵循本指南:http://bencos.googlecode.com/svn-history/r137/trunk/out/sox/README.win32.txt 運行「./configure」時,它告訴我它「找不到LAME」。我已經將lame-enc.dll放在sox目錄中,但未檢測到。任何人都可以幫我弄清楚爲什麼這會失敗嗎?這裏的命令,並從日誌文件中的輸出:在Cygwin中構建SoX與LAME支持

./configure --with-lame 

... 
configure:13645: checking whether to dlopen lame 
configure:13654: result: no 
configure:13664: checking lame/lame.h usability 
configure:13664: gcc -c -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -fopenmp conftest.c >&5 
configure:13664: $? = 0 
configure:13664: result: yes 
configure:13664: checking lame/lame.h presence 
configure:13664: gcc -E conftest.c 
configure:13664: $? = 0 
configure:13664: result: yes 
configure:13664: checking for lame/lame.h 
configure:13664: result: yes 
configure:13689: checking for lame_get_lametag_frame in -lmp3lame 
configure:13714: gcc -o conftest.exe -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -fopenmp conftest.c -lmp3lame >&5 
conftest.c:53:1: warning: function declaration isn't a prototype 
conftest.c:55:1: warning: function declaration isn't a prototype 
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lmp3lame 

編輯:我配置使在Cygwin的安裝幾個包和更新的路徑工作。專業技巧是閱讀安裝文件,看看他們是否列出了需要的軟件包,並且可能檢查Linux發行版,因爲它們的軟件包引用了依賴關係和構建依賴關係。

回答

1

你需要--enable-dl-lame以及使其將使用動態庫:

./configure --with-lame --enable-dl-lame 

編輯納入從註釋討論信息:

更多的Cygwin包可能是必需的,這樣的如libltdllibtool-*(用於動態加載支持),zlib相關包(用於libid3tag)等等。

另外,configure.ac需要修補(在行175中將*mingw*)更改爲*cygwin* | *mingw*)),則必須通過autoreconfgcc-tools Cygwin包)重新生成configure腳本。或者,您可以嘗試找到對應於configure.ac第175行的configure中的行並更改該行;在這種情況下再生是不必要的。

+0

好吧,我試過了。唯一改變的是這些行,失敗方式與原始文章中的日誌相同。 配置:13645:檢查是否dlopen lame 配置:13654:結果:是的 – David

+0

然後,我想你沒有'libltdl'支持任何原因,可能因爲配置只檢查主機三重遏制'*明戈*'。你有autotools('autoreconf'等)嗎?如果是這樣,請嘗試將''mingw *)''configure.ac'中的第175行更改爲'* cygwin * | * mingw *)',然後運行'autoreconf'並重試。 – chirlu

+0

我安裝了libltdl7和gcc-tools(autoreconf)。現在「configure」成功完成,但失敗:無法找到ltdl.h – David

1

zlib-devel包提供了-lz所需的庫。

+0

謝謝!這是最後一個包,我現在可以編譯所有東西。 – David