Compiling CUDA and Cg

I have CUDA 2.1 installed and wish to compile a program that uses both CUDA and Cg.

I’ve downloaded and installed Cg2.2 (using the OSX .dmg file). It has installed successfully; example programs compile and execute.

My problem is how to set up a makefile to compile and link a program that uses both CUDA and Cg.

  • the Cg examples use the -framework Cg parameter
  • nvcc dislikes -framework parameters, so I am trying to set up the makefile to do explicit linking of the library files.
  • I cannot locate where the Cg installer has installed libCg.dylib etc …

Does anyone know where the library files are installed on OSX, or any other method for compiling and linking .cu and .cg files.


Just do your linking with gcc / g++. nvcc can compile object files with the -c parameter.