mingw - 如何使用 MinGW / MSYS 在 Windows 上编译 htmlcxx?
问题描述
我正在尝试使用 MinGW / MSYS 编译 htmlcxx lib,但我遇到了麻烦。首先,我收到了这个错误:
make : The term 'make' is not recognized as the name of a cmdlet, function, script file, or
operable program.
在我通过编辑 PATH 弄清楚这一点后,我开始收到关于“./configure”命令的相同错误
./configure : The term './configure' is not recognized as the name of a cmdlet, function,
script file, or operable program.
这个问题的根源是什么?
解决方案
首先,我真的建议使用 MSYS2 ( https://www.msys2.org/ ),因为它比 MSYS 更新和更快,而 MinGW-w64 因为它比 MinGW 更新,并且支持 32位和 64 位 Windows。
您的错误表明您正在从 PowerShell 运行这些命令,而不是从 MSYS (bash) shell。从 MSYS shell 运行相同的命令。
事实上,你可以省略autoreconf -i
,因为已经有一个configure
脚本。
在自己尝试之后,我发现 MSYS2/MinGW-w64 构建需要一些技巧才能构建(静态库和共享库):
INSTALLPREFIX=/usr/local
./configure --prefix=$INSTALLPREFIX &&
sed -i.bak -e "s/\(allow_undefined=\)yes/\1no/" libtool &&
make install-strip am_libcss_parser_pp_la_OBJECTS="parser_pp.lo parser.lo css_syntax.lo css_lex.lo" LIBS="-Wl,--as-needed -liconv" &&
echo Success
我已在此处向 htmlcxx 报告了这些 MinGW-w64 构建问题。
推荐阅读
- excel - 通过 Excel 工作表上的按钮在加载项中运行宏
- arrays - 数组中 M 范围后的最大值
- sql - ORA-00998: 必须使用列别名命名此表达式。在不同的架构中它可以工作
- sql - 将日期的 Min-Max 值返回到具有条件的一列中
- c# - Linq 动态查询(除了 SQL SERVER 端)
- python - 在 django 中更新表单后,它会创建表单的新实例而不是更新它
- python - Neo4j python驱动连接多个数据库
- php - 如何在 php 中存储巨大的 int 值,我将 13262075231096090737 存储在 mysql 中,但它显示为 1.3262075231096E+19
- testing - 如何使用 mocha 运行位于不同文件夹中的所有测试文件?
- php - 缺少脚本:bootstrap/app.php,在我安装作曲家之后