开发者

How to get minGW to find the path to compile and link correctly

I am currently using Sams Teach yo开发者_开发知识库urself C++ in 24 Hours for my computer science class that starts in about a week and it told me to download minGW and then change the path variable to ;C: \MinGW\bin, which I did, but then when I attempted to compile and link the "program" it told me to create, it says no such file or directory. Does anyone know why it is saying this or how it can be fixed? I even put the file which is named motto.cpp into the bin file and it is still saying that it cannot be found.


Are you on Windows 7? If so, try opening Start Menu, searching for "Variables" and select "Edit System Variables" then search for the button at the bottom "Environment variables..." and push it. Then select "new..." under "User variables for ", assign it a name and put the C:\MinGW\Bin path for the value. Press "OK" twice and try it from command line.

I am unsure if you are using a compiler IDE such as DevCPP or CodeBlocks, so I am assuming you are doing this from command line. If this is a compiler issue, try editing the compiler settings for include, bin and lib. Point them to the MinGW bin for bin and include for include etc...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜