Is it possible to use MinGW in Windows 7 installed with bootcamp? Also my basic C++ programs are crashing in Windows 7.

I have just began an introductory course in C++ and I have no programming experience. In class we use MinGW in order to compile our C++ programs. I installed Windows 7 on my rMBP as well as MinGW. I was hoping to use it in class, however I have encountered problems. I am not able to run any of my basic programs such as HelloWorld.exe on my Mac. They crash in Windows 7 every time. Is there a solution to this? Any help is greatly appreciated!

MacBook Pro with Retina display, OS X Mountain Lion (10.8.1), Installed Windows 7 SP1 w/ bootcamp

Posted on Aug 30, 2012 8:32 AM

Reply
3 replies

Aug 30, 2012 9:55 PM in response to etresoft

I was able to get MinGW to work this afternoon on my bootcamp Windows 7. I had to install it into my User folder rather than just on the C: folder where it installs by default. I don't know if this is some kind of issue with Windows on Macs or what. I would just use Xcode however my teacher wants us to write the programs in a simple Text Editor or Notepad and then compile them in a command line window. I have read that Xcode has a gcc compiler, however as I have literally no experience with any programming I have no idea how to link libraries or whatever is needed to make the programs I need. I feel as though I would just be making the class harder on myself. If you could help me with Xcode I would love that! I know there are command line tools available for Xcode if you register as a developer. Thanks again!

Aug 31, 2012 5:51 AM in response to DSTEEB

It sounds like you have pretty good professor. That is the same advice I give to people just starting out in programming.


I think your professor is recommending the use of MinGW because it is an easy way to get Windows to work like a real UNIX machine and help students learn the basics of how a compiler works. A Mac, however, already is a real UNIX machine. All you have to do is download Xcode and go to Xcode > Preferences > Components and download the command line tools. Then, you will be able to work purely from the command line as your professor wants. You could use a text editor like TextWrangler or you could learn a real UNIX tool like "vi". You can use GCC on the Mac or try out Apple's new Clang compiler. Clang is better at finding errors that GCC will ignore and silently fix for you. Clang also has much better error reporting. It will even suggest solutions. That is far beyond the cryptic error messages in GCC (which is the compiler in MinGW, by the way).


Run this idea by your professor. I strongly suspect you will get a good response.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Is it possible to use MinGW in Windows 7 installed with bootcamp? Also my basic C++ programs are crashing in Windows 7.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.