How to link against msvcr90.dll with mingw gcc?

↘锁芯ラ 提交于 2019-12-03 15:47:32

Try

gcc hello.c -nostdlib -lmsvcr90 -lgcc -o hello.exe

instead. I'm a little surprised that your original compilation attempt succeeded, since there should've been conflicting definitions between msvcr90 and msvcrt (which MinGW links in by default). This way, msvr90 gets linked in, the conflicting msvcrt doesn't, but libgcc gets added in order to initialize the runtime library.

I don't have msvcr90.dll on my computer, but I was able to verify that the analogous invocation works with msvcr100.dll.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!