8

I would like a standalone C++ compiler that doesn't need installing. Something that can run from a directory or from a USB key.

I have googled it, but I can't really find exactly what I am looking for. It doesn't matter if it is just a command line compiler or if is an IDE. I would appreciate a link to the page where I can actually download the file that I need.

Since I am still new to C++, just to make sure that you all understand what I am looking for: I would like a program so that I can run that program on a source file (.cpp) and produce and executable.

I am on 64 bit Windows 7.

EDIT: Just to be clear. I would prefer if I could simply just download a zip-file (or something like that) and unzip it into a directory on the computer and then boom it works.

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
Thomas
  • 1,085
  • 5
  • 19
  • 33
  • Codeblocks works well for me. The only thing to do is to upgrade the compiler/libraries, as the non-nightly builds are getting old now. http://www.codeblocks.org/downloads – chris Jun 01 '12 at 03:58
  • @chris: That would be great. I use Codeblocks on another computer. Do you have a link to where I can find a standalone version? – Thomas Jun 01 '12 at 04:01
  • 1
    @chris: To nitpick, codeblocks is an IDE not a compiler. – Jesse Good Jun 01 '12 at 04:02
  • That's what I use on my USB. You have to move the configuration file to the CodeBlocks directory to get it to carry your settings if there's no file on the hard drive. – chris Jun 01 '12 at 04:02
  • @JesseGood, correct. However, `It doesn't matter if it is just a command line compiler or if is an IDE` – chris Jun 01 '12 at 04:02
  • 1
    While perhaps heavyhanded, I use virtual machines to get nice isolated environments with all the tools I need for a project, and keep everything else clean. Easy to move from one machine to another. The approach does require that the machines you're interacting with have VirtualBox (or whatever) installed, and there is some performance loss during the virtualization. But you could also make a bootable Live linux distribution, it just depends on what your constraints are...and why you're using Windows in the first place. – HostileFork says dont trust SE Jun 01 '12 at 04:04
  • The nice thing I find with C::B that looks like it suits your taste is that you can just make a program, save it as a C++ program, and compile/run it without taking the space and time to make a project for every one you create. And with the answer given, even better. – chris Jun 01 '12 at 04:11

2 Answers2

12

I recommend STL's MinGW distro, which is xcopyable and includes the latest GCC (currently, GCC 4.7).

James McNellis
  • 348,265
  • 75
  • 913
  • 977
  • Looks like this fits in pretty well with C::B, seeing as how it uses MinGW. I'm going to try to see, as simple compiler/library updates are nice, and I don't currently have boost. – chris Jun 01 '12 at 04:09
  • Wow, works amazing! You may have made my day better more so than the OP's. – chris Jun 01 '12 at 04:26
  • James: Thanks a bunch for this. It works just like I wanted it too! – Thomas Jun 01 '12 at 04:35
2

SO user rubenv has some distributions of Mingw-w64:

For gcc 4.7.0. Grab one with win64 in the filename.

He also had clang somewhere, but I can only find the 32-bit windows version right now.

Just download and unzip the file. You will have to update your PATH manually though. However, no boost like STL's distro.

Jesse Good
  • 50,901
  • 14
  • 124
  • 166