开发者

use specific compiler with MINGW

I have an old project which i want to co开发者_开发百科mpile with the 4.1.2 version of GCC and G++. i have them downloaded, but i don't know how to give it to the MINGW to use them as default c/c++ compilers. Anyone know how to do it?


If you downloaded the whole package (gcc, binutils, runtime, win32api) from one release of MinGW (not required, but ensures compatibility), you can extract them some folder on your hard drive, say

C:\oldmingw

So that C:\oldingw\bin contains a gcc.exe.

Open a command prompt (type cmd.exe in the Vista/7 Orb search box or in the Windows "Run Command" dialog). Type

set PATH=C:\oldming\bin;%PATH%

Run

gcc -v

And ensure that the version reported is 4.1.2.

On linux, same thing, but the directory will be different, and your command to set PATH will be:

export PATH=/path/to/oldmingw:$PATH
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜