Compiler options for use with nVidia's CUDA SDK

  • From: Joseph Areeda < >
  • To:
  • Subject: Compiler options for use with nVidia's CUDA SDK
  • Date: Thu, 27 Sep 2012 17:50:04 -0700

I'm just getting started working with nVidia's CUDA SDK and ran into a minor glitch that I can't track down.

Basically NVidia has a compiler wrapper called nvcc that replaces gcc and deals with both C/C++ and GPU kernel code.

I followed an older write up for NetBeans 6.x integration that I found on the web and defined a tool collection and things almost work.

My problem is that NetBeans tries to compile the program with options that need to be passed through nvcc.  What I mean is I get compiler errors like:

nvcc    -c -g -I/usr/include -I/usr/local/cuda/include -I/home/joe/NVIDIA_GPU_Computing_SDK/shared/inc -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp
nvcc fatal   : Unknown option 'MMD'

A little command line experimentation and I think what we want is to make it

nvcc    -c -g -I/usr/include -I/usr/local/cuda/include -I/home/joe/NVIDIA_GPU_Computing_SDK/shared/inc --compiler-options "-MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d" -o build/Debug/GNU-Linux-x86/main.o main.cpp

I don't see where to change the compiler options that are used and I can't find anything with directions for  NetBeans 7.x and the CUDA SDK.

I'd really appreciate some pointer to documentation on using this SDK with NetBeans 7.x or some guidance in setting compiler options.


Use of Header files

parul853 09/26/2012

Re: Use of Header files

paulf 09/26/2012

Compiler options for use with nVidia's CUDA SDK

Joseph Areeda 09/28/2012

Project Features

About this Project

CND was started in November 2009, is owned by DimaZh, and has 187 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm