萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 作業系統 >  >> Linux 教學

Wine 執行 Windows 軟體常見錯誤與解決方案實錄:缺失 DLL、X11DRV 補丁、斷言失敗

1. RTX 安裝缺失 mfc42u.dll 等系統庫

解法:從 Windows C:\Windows\System32 複製對應 DLL 至 Wine 對應目錄 (通常為 ~/.wine/drive_c/windows/system32/)。

2. 自編 Wine 出現 "libxml2 support was not present at compile time"

解法:安裝 libxml2-dev 開發套件後重新編譯 Wine。

3. 帶輸入法偵測軟體 (如招商證券) 出現 X11DRV_SetDIBits 錯誤

需對 Wine 原始碼打補丁。修改 dlls/winex11.drv/dib.c:

  • 新增指標檢查邏輯 (IsBadReadPtr)
  • 修正 dibpitch 計算與賦值
  • 詳細 diff 見原文程式碼區塊

Debian 系統重新編譯打包流程:


cd wine
sudo debian/rules clean
sudo debian/rules build
sudo debian/rules binary

4. 斷言失敗錯誤:text.c: usr32 pellip->under == 0 && pellip->after == 0

原因:亂碼/編碼問題導致邏輯判斷異常。
解法:設定 Wine 支援中文 locale (如 LANG=zh_TW.UTF-8 或 zh_CN.GBK),重啟 Wine 即可。

copyright © 萬盛學電腦網 all rights reserved