Setting up MS Visual C++ Express to target for 64-bit (x64)

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Setting up MS Visual C++ Express to target for 64-bit (x64)

Postby wing » 22 Apr 2011, 14:43

Haven't been able to set up MSVC++ Express to target for x64.
I installed all updates, including .Net Framework 4, and searched internet for more info on the error I keep getting:

The "ConfigurationGeneral" rule is missing from the project.

Win32 works OK.
Is there a way to download a C++ compiler that targets x64, and then use it from within the MSVC++ Express environment?
wing
 
Posts: 21
Joined: 17 Mar 2011, 10:49


Re: Setting up MS Visual C++ Express to target for 64-bit (x

Postby wing » 23 Apr 2011, 00:41

Dann,
Thanks for helping. I know the post and tried it before, and get following message after selecting Windows7.1SDK as Platform Toolset:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(153,5): error : Required file "" is missing.
Probably need to find a forum where this belongs, it's not chess-related...
Stef
wing
 
Posts: 21
Joined: 17 Mar 2011, 10:49

Re: Setting up MS Visual C++ Express to target for 64-bit (x

Postby Kirill Kryukov » 26 Apr 2011, 12:28

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.
User avatar
Kirill Kryukov
 
Posts: 127
Joined: 21 Sep 2005, 09:56


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 5 guests