> # TOPIC

> win64 - using Cg with 64-bit Windows

> # ABSTRACT

> The Cg Toolkit for Windows installs versions of the Cg compiler and runtime libraries for both 32-bit (x86) and 64-bit (x64) compilation. This topic documents how to use Cg for 64-bit Windows.

> # 64-BIT INSTALLATION

> The Cg Toolkit installer (CgSetup.exe) installs the 32-bit version of the Cg compiler and the Cg runtime libraries by default. To install the 64-bit support, you must check the component labeled "Files to run and link 64-bit (x64) Cg-based applications" during your installation.

> If you've forgotten to install the 64-bit component, you can re-run the Cg Toolkit installer and check the 64-bit component.

> # EXAMPLES

> The Cg Toolkit includes Visual Studio .NET 2003 projects intended to compile 64-bit versions of the Cg Toolkit examples.

> These project files match the pattern *_x64.vcproj

> The solution files that collect these projects matches the pattern *_x64.sln

> To use these project files with Visual Studio .NET 2003, you must also install the latest Windows Platform SDK to obtain 64-bit compiler tools and libraries.

> Once the Platform SDK is installed, from the Start menu navigate to start a Windows shell for the 64-bit Windows Build Environment. This shell is started with the correct environment variables (Path, Include, and Lib) for the 64-bit compiler tools and libraries.

> Now run devenv.exe with the /useenv command line option that forces Visual Studio to pick up Path, Include, and Lib settings from the shell's environment. When the Visual Studio IDE appears, select File->Open->Project... and locate one of the *_x64.sln files for the Cg examples. These are usually under:

>       c:\Program Files\NVIDIA Corporation\Cg\examples

> When you open a *_x64.vcproj solution, it references a number of *_x64.vcproj projects. These have a "Debug x64" and "Release x64" configuration to build.

> # HINTS

> Remember to link with BufferOverflowU.lib because of the /GS option to help detect string overflow runtime errors because Microsoft has enabled this option by default in its 64-bit compilers. See:

>       support.microsoft.com/?id=894573

> # IA64 SUPPORT

> The Cg Toolkit does not provide 64-bit support for Intel's Itanium architecture.

> # SEE ALSO

> TBD