It's nice to write a C program using Notepad and compiling it on a command line with CL, but using Visual Studio is so much more comfortable. Well for those who want to give it a try, read on. It's 5 minutes work to get Visual Studio to work with the AMD64 compiler from the DDK. Since I'm using Visual Studio .NET 2003, I'll describe the procedure the that version, but it shouldn't be too difficult to adapt it for older versions of Visual Studio.
Preperations:
Basically what needs to be done is; setenv.bat needs to be loaded in a Command Prompt window from where Visual Studio needs to be launched with: devenv /useenv. This is the minimum required to set it up, however, using a shortcut on the Start Menu would be a lot more user friendly. Perform the steps listed below step-by-step to set this up.
- Download this batch file.
- Make sure the paths used in the batch file correspond with the location of you Visual Studio installation. Edit it if necessary and check if it works (eg. Visual Studio starts).
- Now create a new shortcut pointing to this batch in the Microsoft Visual Studio .NET 2003 program group.
- If you want to change its icon, I suggest you use the one from devenv.exe.
- Now start Visual Studio using the new shortcut.
- Check under Tools --> Options... --> Projects --> VC++ Directories the environment variables under Show directories for: Executable files, Include files and Library files. If the all point to the proper directories under the base installation directory of the Windows DDK, then you're in business.

- Open the Configuration Manager window found on the build menu. Create two new Solution Configurations for your AMD64 environment. I called them, as AMD suggested, Release64 and Debug64. Copy the settings from the default configurations.
- Whenever you create or open a solution to be compiled with the AMD64 compiler, make sure you always check the following project configuration properties:
- C/C++ --> General --> Debug Information Format = Program Database (/Zi).
- Linker --> Command Line --> Additional Options: = /machine=AMD64.
- All settings modified project setting are applicable to the Release builds and Debug builds
- If compiling is a success, the output windows of Visual Studio displays something like this:
- Although the output window displays something like: Release64 Win32 ------ it's definitely 64-bit compiled.
This is all there is. Now you can develop AMD64 applications for Windows for 64-bit Extended Systems using Visual Studio. It's just more user friendly then Notepad and CL are.
RvV.
|