考虑一个C++程序:
#include <sqlite3.h>
int main(int argc, char**argv) {
return 0;
}
void not_called() {
sqlite3_initialize();
}
编译、链接和运行它:
$ x86_64-w64-mingw32-g++ -c -g -o augh.o augh.cpp
$ x86_64-w64-mingw32-g++ -static -fstack-protector -g -o augh.exe augh.o -lsqlite3
$ wine augh.exe
在Fedora 36上,使用
- 明威64-气相色谱-C++-11.2.1-5.fc36.x86_64
- 葡萄酒-7.12 -1.fc36.x86_64
- mingw64-sqlite-static-3.36.0.0-3.fc36.noarch
以及之前的wine-7.10-2.fc36.x86_64,我总是得到以下输出:
[juckelman@midas augh]$ ./augh.exe
002c:fixme:winediag:LdrInitializeThunk wine-staging 7.12 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
0080:err:x11drv:X11DRV_ChangeDisplaySettingsEx Failed to write L"\\\\.\\DISPLAY1" display settings to registry.
0080:err:system:NtUserChangeDisplaySettings Changing L"\\\\.\\DISPLAY1" display settings returned -3.
0080:err:explorer:initialize_display_settings Failed to initialize registry display settings for L"\\\\.\\DISPLAY1".
0114:err:sync:RtlpWaitForCriticalSection section 00000002DE99D010 "?" wait timed out in thread 0114, blocked by 0000, retrying (60 sec)
最后一行无休止地重复,程序永远不会退出。
如果我注解掉sqlite3_initialize()
(它位于一个从未被调用过的 * 函数中!*),我会得到以下输出:
[juckelman@midas augh]$ ./augh.exe
002c:fixme:winediag:LdrInitializeThunk wine-staging 7.12 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
0080:err:x11drv:X11DRV_ChangeDisplaySettingsEx Failed to write L"\\\\.\\DISPLAY1" display settings to registry.
0080:err:system:NtUserChangeDisplaySettings Changing L"\\\\.\\DISPLAY1" display settings returned -3.
0080:err:explorer:initialize_display_settings Failed to initialize registry display settings for L"\\\\.\\DISPLAY1".
[juckelman@midas augh]$
程序每次都成功退出。
在Fedora 35上使用
- 明威64-气相色谱-C++-11.2.1-3.fc35.x86_64
- 葡萄酒-7.2 -1.fc35.x86_64
- mingw64-sqlite-static-3.36.0.0-2.fc35.noarch
无论是否存在X1 M1 N1 X,程序都以任一方式成功退出。
在Fedora 36上,如果我动态链接sqlite3,程序也会成功退出。
这是怎么回事?
1条答案
按热度按时间3duebb1j1#
Wine 7.22不再出现这种情况,解决办法是升级。