Cg Toolkit Cg 3.1 Toolkit Documentation
Cg / Topics / win64

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:

  http://support.microsoft.com/?id=894573

Ia64 Support

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

See Also

TBD


Cg Toolkit | Cg Toolkit | Download | Release Archive | Profiles | Reference | Books | Discussions |


Cg Topics

cg1_2_runtime_changes
Cg
glut
mac
trace
win64