Hello, wing.
The simplest way to use 64-bit version of MS C/C++ compiler is this: Download and install the SDK, then use the compiler from the command line. Wrap it in a batch file, makefile, or another script of your choice. Also you'll need that script to set a proper environment. Example batch file:
- Code: Select all
@call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x64 /vista 2>nul
@cl.exe /nologo /Ot /Ox /Oi /Oy /Ob2 /MT /Foobj\4x4c_msvc_x64.obj /c /Tcsrc\solver.c
@cl.exe /nologo /Fe4x4c_msvc_x64.exe obj\4x4c_msvc_x64.obj
The luxury of calling the compiler from within the source editor is, IMHO, unnecessary. It may be possible to configure the most IDEs for this, but I prefer to know exactly what compiler and options are being used, to be in control, and to have no dependences on an IDE. I can easily switch an editor and not spend a minute thinking about compilation options or paths, as they will remain in the same batch file. For a large project you may prefer makefiles.
One good point of this approach is that it allows you to easily integrate another compiler (or several) into your building and testing workflow. For example it's good idea to keep compiling your code with GCC, to make sure you are not writing something unportable, also GCC gives some nice warnings.