How can I verify configuration of my compiler for AMD64/Windows64 system?

Categories:
Solution Number:
S20811
Last Modified:
2013-08-20
Issue

How can I verify configuration of my compiler for AMD64/Windows64 system?

Solution

Microsoft distributes a version of complier for AMD64/Windows64 systems with recent (released after January 2004 at least) versions of the Microsoft Platform SDK. That SDK installer creates shortcuts to various supported build environment in the Windows Start menu. Shortcut that brings up a command prompt that is set up for AMD64/Windows2003x64 is accessible (in Windows Server 2003 SP1 SDK) via Start->Microsoft Platfrom SDK for Windows 2003 Server SP1->Open Build Environment Window->Windows Server 2003 64-bit Build Environment->Set Win Svr 2003 AMD64 Build Env (Retail, PreRelease)To verify that complier is installed correctly and is capable of producing 64-bit executable, follow these steps:- type CL. You should see AMD64 as the target architecture mentioned in the output.- create file hello.c with this content:===#include <stdio.h>intmain (int argc, char ** argv){printf (Hello, I am a %d-bit application. , sizeof (void *) * 8);return 0;}====compile and link application:cl hello.clink hello.objrun produced executable hello.exeExecution will fail if you are not running Windows/x64 on AMD64 or compatible system, otherwise you should see Hello, I am a 64-bit application. printed.If you do see this message, this shell window can be used to run 64-bit simulations using simulation kernels for windows-x64/AMD64 which are included in $OPNET/$VERSION/sys/pc_amd_win64/bin directory.

Environment

Compiling/Linking

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case