MinGW is a collection of windows development tools including compilers such as GCC and G++.
下載 mingw-get-setup.exe
https://null-byte.wonderhowto.com/forum/set-up-mingw-kali-using-wine-0159622/
用 WINE 來安裝
$ WINEARCH=win32 WINEPREFIX=~/wine-mingw winecfg
$ export WINEPREFIX=~/wine-mingw
$ wine /path/to/file/mingw-get-setup.exe
依照說明,安裝 mingw32-base。
設定環境變數 PATH
https://forum.winehq.org/viewtopic.php?f=8&t=19457
https://wiki.winehq.org/Useful_Registry_Keys
執行,出現錯誤,待解決。
$ wine c:\\MinGW\\bin\\gcc.exe iatpatcher.cpp
gcc.exe: error: CreateProcess: No such file or directory
解決方法,要裝 mingw32-gcc-g++
http://pclevinblog.pixnet.net/blog/post/314560381-mingw---錯誤(createprocess%3A-no-such-file-or-directory)(五
然後,新的錯誤
iatpatcher.cpp:67:35: error: 'ARRAYSIZE' was not declared in this scope
#define PATCHCOUNT ARRAYSIZE(patch)
只要把程式中,ARRAYSIZE(A) 定義前的註記拿掉即可
#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
執行下列指令,即可成功編譯執行檔
$ wine gcc -s -o iatpatcher.exe iatpatcher.cpp -lstdc++ -static
patch 後的 php-7.0.27,在命令視窗執行 php -i,會出現 "找不到 api-ms-win-crt-convert-l1-1-0.dll" 的錯誤。安裝 Visual C++ Redistributable for Visual Studio 2015 即可。
嗯,最終,phpinfo() 可以正常輸出結果了,但是我要用 sqlsrv 的 driver,還是沒辦法在 win 2003 面跑。
沒有留言:
張貼留言