Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Hi, I am starting to learn C++ so I don't have much experience with command line compilers. I have installed MinGW-w64 (TDM-GC) and I dont know how to use it. I have used the original MinGW and that came with MSYS which made it easier to work with but MinGW-w64 doesn't have it (atleast I cant find it). Am I supposed to use Command Prompt to controll MinGW-w64? How do I do that? Is there any place I can go to get clear instructions for working with this toolchain? What I am trying to do is have Visual Studio use MinGW-w64 as my compiler for 64bit compilation. Anybody know how? If I can figure out how to use this compiler I might be able to do that myself.
mingw-w64 itself doesn't come with an IDE, so yes, you are supposed to use it from the command line, just SET your PATH to include the top level "bin" directory. MSYS just provides a unix-ish shell, for your purpose, its no different than cmd.
An IDE provides convenience, you can try Eclipse or CodeBlocks, but you'll have to consult your IDE documentation on how to integrate with mingw-w64. As for Visual Studio, I suspect you can type your code in it, but won't be able to use gcc to compile it unless you go back into the command line, iirc you can call gcc in msvc only if you do a complex workaround.
If you just want to learn C++ without all the hassles of setting up a compile, I would suggest that you use Visual Studio, since you already have it installed.
jon_y, thanks for the reply. I am going to just use VisualStudio to learn C++, but in the future I would like to learn to use Mingw-w64 for 64bit projects. Is there a good manual for learning how to use it through CMD? I cant find any instructions anywhere on how to use MinGW-w64 in anyway, does it work exactly the same as MinGW (with a few exceptions)? If thats the case I will just go ahead and learn MinGW, but I want to know for sure before I start. Thanks!
Well, you can start by learning how to use the Windows command prompt and Linux command prompt (know the difference), google can help here. After that, you can start with the GCC manual, I can't emphasize enough how important it is for new users to start there first for an overview of GCC instead of jumping in and getting lost in misadventure.
Next, see http://sourceforge.net/apps/trac/mingw-w64/wiki/download%20filename%20structure for help on downloading suitable versions.
mingw and mingw-w64 are largely similar, you won't notice much difference until you go into win32 API or want to use 64bit code. mingw of course is geared towards 32bit code, but mingw-w64 can do either.
Actually MinGW is a very convenient tool, you can type your code with any text editor (including Visual Studio), and just make a BAT file containing something like:
gcc -municode -mwindows -o Test1.exe Test1.c
and just click the BAT file icon everytime you want to recompile.
I myself using mingw-w64 to create objective-c based applications on Windows, and made a few DLL containing objective-c objects from within Visual Studio 2010, then call them from normal GNU's objective-c source code.