在 Cygwin 中构建具有 LAME 支持的 SoX

标签 build open-source cygwin sox lame

我正在尝试使用 LAME (3.99.5) 在 Cygwin 中构建支持 MP3 的 SoX (14.4.1)。我一直在遵循本指南:http://bencos.googlecode.com/svn-history/r137/trunk/out/sox/README.win32.txt 运行“./configure”时,它告诉我“找不到 LAME”。我已将lame-enc.dll放入sox目录中,但未检测到。谁能帮我弄清楚为什么会失败?这是命令和日志文件的输出:

./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 中安装多个软件包并更新路径来使 configuremake 正常工作。专业提示是阅读安装文件,看看它们是否列出了所需的软件包,并可能检查 Linux 发行版,因为它们的软件包引用了依赖项和构建依赖项。

最佳答案

您还需要--enable-dl-lame,以便它将使用动态库:

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

编辑以纳入评论讨论中的信息:

可能需要更多 Cygwin 软件包,例如 libltdllibtool-*(用于动态加载支持)、zlib 相关软件包(用于 libid3tag)等

此外,configure.ac 需要修补(将 *mingw*) 更改为 *cygwin* | *mingw*) 在第 175 行),那么必须通过 autoreconf (gcc-tools Cygwin 包)重新生成 configure 脚本)。或者,您可以尝试在 configure 中找到与 configure.ac 第 175 行相对应的行并进行更改;在这种情况下不需要重新生成。

关于在 Cygwin 中构建具有 LAME 支持的 SoX,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16563929/

相关文章:

gradle - 如何移动生成的gradle源?

android - 琐碎的驱动器构建失败

来自命令行的 Xcode "Build and Archive"

scala - 使用 -feature 重新运行以获取详细信息,如何在使用 gradle 构建时查看 scala 功能警告?

email - 用于测试的干净轻量级邮件服务器

perl - Perl 中奇怪的打印行为

c# - 示例性开源 C#/WPF 应用程序

PHP电子商务API?

bash - ffmpeg在cygwin下找不到输出目录

github - 将 Git 与 Cygwin 结合使用