<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type='text/xsl' href='../bbs/themes/xml/xsl/1.xsl' version='1.0'?>
<Topic>
	<Subject>
		<SectionId>46</SectionId>
		<SectionTitle>BBS开发</SectionTitle>
		<TopicId>472420</TopicId>
		<TopicTitle>兼容MSYS2</TopicTitle>
	</Subject>
	<Articles>	<Article>
		<PostUserId>2</PostUserId>
		<PostUserName>leaflet</PostUserName>
		<PostUserNickName>Leaf・退隐江湖</PostUserNickName>
		<rank>★★★★★</rank>
		<credit>109125</credit>
		<photo>images/face/upload_photo/face_2.gif</photo>
		<ArticleId>472420</ArticleId>
		<ArticleTitle>兼容MSYS2</ArticleTitle>
		<ExpressionIcon>1</ExpressionIcon>
		<PostDateTime>2025-11-23 13:21:52 (UTC +08:00)</PostDateTime>
		<PostIP>180.157.*.*</PostIP>
		<Content><![CDATA[历经好几天，在成功解决部分SysV API不被MSYS2兼容，并修复若干MSYS2下特有的bug后，终于基本完成了LBBS对MSYS2的移植。

已知的限制：
1、MSYS2下没有systemd，所以无法以daemon service方式运行。
2、MSYS2下没有epoll，会自动使用poll作为替代，但是性能可能比epoll略差。
3、MSYS2下没有mysqlclient，在安装了mingw-w64-x86_64-libmariadbclient的情况下，会自动适配，不影响使用。
4、MSYS2下不支持动态链接库，需要在configure命令后加上--disable-shared，否则会无法使用穿梭、游戏等动态链接库的功能。
5、MSYS2下的libiconv的实现，可能和Linux下不同，存在一些奇怪的现象，已尽可能保持兼容，目前暂不影响使用。

详细安装说明，请查看源代码中的INSTALL.md文件。
]]></Content>
		<Length>627</Length>
		<Visible>1</Visible>
	</Article>
	<Article>
		<PostUserId>2</PostUserId>
		<PostUserName>leaflet</PostUserName>
		<PostUserNickName>Leaf・退隐江湖</PostUserNickName>
		<rank>★★★★★</rank>
		<credit>109192</credit>
		<photo>images/face/upload_photo/face_2.gif</photo>
		<ArticleId>472421</ArticleId>
		<ArticleTitle>Re: 兼容MSYS2</ArticleTitle>
		<ExpressionIcon>42</ExpressionIcon>
		<PostDateTime>2025-11-23 22:46:48 (UTC +08:00)</PostDateTime>
		<PostIP>180.157.*.*</PostIP>
		<Content><![CDATA[【安装步骤】

1、通过安装包安装MSYS2，并在MSYS终端中运行pacman -Syu升级到没有更新为止。
2、安装需要的工具，运行pacman -S base-devel gcc gdb pkgconf autoconf automake libtool
3、安装依赖包，运行pacman -S --needed msys2-runtime-devel libssh libssh-devel pcre2-devel mingw-w64-x86_64-libiconv mingw-w64-x86_
64-libmariadbclient
4、在bash启动文件中加入export PATH=$PATH:/mingw64/bin
5、按照INSTALL.md中的步骤说明，完成配置、编译、安装和数据文件的生成。

--
※ 作者已于 2025-11-23 18:58:57 (UTC -08:00) 修改本文※
]]></Content>
		<Length>508</Length>
		<Visible>1</Visible>
	</Article>
	</Articles>
</Topic>