I cannot get the plugin to work, but I can get CUDA, at least in Release config, to build and run on Snow Leopard 10.6.4 + XCode 3.2.3 + CUDA 3.1 by setting up custom build rule in XCode based on http://six.manoverboard.org/book.html.
Step 1. Follow instructions on http://six.manoverboard.org/book.html to set up a custom build rule for CUDA (*.cu) files. The “Custom Script” I used was (based on what I could extract from NVIDIA makefiles in their SDK):
This works for me, but I am sure those with better knowledge of gcc will provide better scripts in future posts :rolleyes: Replace <YOUR_SRC_ROOT> by the root of your source files, and put additional -I for each include path, eg. boost include. I build for 64 bit, so the flag -m64. If you want to build for 32 bit, I think the flag MAY be -m32, but please check NVIDIA makefiles.
The “Output file” from the custom build is
${INPUT_FILE_BASE}.o
Step 2. Add /usr/local/cuda/lib to your project lib path, and additional link flag -lcuda and -lcudart as per previous post(s).
Step 3. What got me totally confused for a while was that my executable could not find the CUDA dylib despite the fact that I had set correct environment variables in my profile. The solution was found at http://www.dribin.org/dave/blog/archives/2009/11/15/rpath/ Follow the instruction there to set the rpath to /usr/local/cuda/lib.
Well, this worked for me… Hope it works for you, at least until someone updates the plugin - good luck!
I created a project and added a file named simpleCUFFT.cu in it. Then I did as what you posted here. The build succeeded. but when I click build & debug ,it said : No launchable executable present at path. What is the problem?
I run on Snow Leopard 10.6.4 + XCode 3.2.3 + CUDA 3.2.
I created a project and added a file named simpleCUFFT.cu in it. Then I did as what you posted here. The build succeeded. but when I click build & debug ,it said : No launchable executable present at path. What is the problem?
I run on Snow Leopard 10.6.4 + XCode 3.2.3 + CUDA 3.2.
Well, I’m still searching for a way to comfortably develop for CUDA on Mac OS X. I tried Xcode and the listed plugin, but it didn’t work properly. I tried Eclipse CDT with the Plugin of the University of Bayreuth, but this does not work either for me.
So, is there any easy way to get a comfortable IDE for CUDA on Mac OS X? Maybe an Xcode solution?
Well, I’m still searching for a way to comfortably develop for CUDA on Mac OS X. I tried Xcode and the listed plugin, but it didn’t work properly. I tried Eclipse CDT with the Plugin of the University of Bayreuth, but this does not work either for me.
So, is there any easy way to get a comfortable IDE for CUDA on Mac OS X? Maybe an Xcode solution?
I was able to find out the source code, if someone with more experience can give a look, the community would appreciate.
[attachment=23893:NVCUDA_PLUGIN.zip] NVCUDA_PLUGIN_SRC.zip (33.4 KB)
I was able to find out the source code, if someone with more experience can give a look, the community would appreciate.
[attachment=23893:NVCUDA_PLUGIN.zip]
Here is a working Xcode plug-in tested with CUDA 3.2 RC1 and Xcode 3.2.4 on Mac Os X 10.6.4, including a template for new projects. Its based on the previous plug-in that used to work with Xcode 3 on Mac Os X 10.5 and was fixed using ideas from the “D Language Plug-in”. Just open the plug-in project, build, and restart Xcode. It works great for me, hope it does for you too :)
Here is a working Xcode plug-in tested with CUDA 3.2 RC1 and Xcode 3.2.4 on Mac Os X 10.6.4, including a template for new projects. Its based on the previous plug-in that used to work with Xcode 3 on Mac Os X 10.5 and was fixed using ideas from the “D Language Plug-in”. Just open the plug-in project, build, and restart Xcode. It works great for me, hope it does for you too :)