Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # create MSYS environment from commands in http://pastebin.com/eJEWjteL
- # change crt to msvcr100
- wget http://pastebin.com/raw.php?i=C42H617B -Omingw32-patch-gcc4msvcrXX.py
- # run "python mingw32-patch-gcc4msvcrXX.py 100" from cmd.exe that has %MINGW%\bin in PATH.
- wget -N http://pastebin.com/raw.php?i=Cq31jtnR -Ocontinue_on_invalid_param.cpp && g++ -D__MSVCRT_VERSION__=0x1000 -c continue_on_invalid_param.cpp -o libcontinue_on_invalid_param.a && cp libcontinue_on_invalid_param.a /mingw/lib && cp libcontinue_on_invalid_param.a /lib
- # build mingw with msvcr100. patch mingw on suggestion from http://developer.berlios.de/devlog/akruis/2012/06/10/msvcr90dll-and-mingw.
- wget -N "http://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/w32api-3.17/w32api-3.17-1-mingw32-src.tar.lzma" && tar --lzma -vxf w32api-3.17-1-mingw32-src.tar.lzma && wget -N 'http://sourceforge.net/projects/mingw/files/MinGW/Base/mingw-rt/mingwrt-3.20/mingwrt-3.20-mingw32-src.tar.gz' && tar vxzf mingwrt-3.20-mingw32-src.tar.gz && cd mingwrt-3.20-mingw32 && curl -s 'http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/mingw/tlssup.c.diff?r1=1.4&r2=1.5&cvsroot=src'|patch && curl -sL 'https://sourceforge.net/tracker/download.php?group_id=2435&atid=302435&file_id=436925&aid=3495292'|patch -p1 && curl -sL 'https://sourceforge.net/tracker/download.php?group_id=2435&atid=302435&file_id=436927&aid=3495304'|patch -p1 && curl -sL 'https://sourceforge.net/tracker/download.php?group_id=2435&atid=302435&file_id=438046&aid=3502499'|patch -p1 && wget -N 'ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/development/rawhide/source/SRPMS/m/mingw32-runtime-3.18-6.fc17.src.rpm' && rpm2cpio mingw32-runtime-3.18-6.fc17.src.rpm|cpio -ivd mingw32-3.18-hack-for-gcc47.patch && patch -p1<mingw32-3.18-hack-for-gcc47.patch && rm mingw32-runtime-3.18-6.fc17.src.rpm && ./configure --prefix=/mingw && mingw32-make -j8 2>&1|tee make.log && make install
- # test
- printf '#include <iostream>\nint main(){return 0;}'|g++ -static-libstdc++ -xc++ - -o~test && ./~test && rm ~test.exe
- ---------------------------
- ~test.exe - Entry Point Not Found
- ---------------------------
- The procedure entry point _fstat could not be located in the dynamic link library msvcr100.dll.
- ---------------------------
- OK
- ---------------------------
Advertisement
Add Comment
Please, Sign In to add comment