Integration with XCODE? Anyone created a CUDA template project?

Firstly,thinks

I have tried as you said, but still no effect…

What else could I have done something wrong?

Screenshot below:
13.tiff (82.5 KB)
11.tiff (89 KB)

Has anyone try the plugin with new xcode 3.1.3 ?

Using plugin with 3.1.2 still not work for me

Has anyone try the plugin with new xcode 3.1.3 ?

Using plugin with 3.1.2 still not work for me

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):

/usr/local/cuda/bin/nvcc -m64 --compiler-options -fno-strict-aliasing -I/<YOUR_SRC_ROOT> -I/usr/local/cuda/include -c ${SCRIPT_INPUT_FILE} -o ${DERIVED_FILE_DIR}/${INPUT_FILE_BASE}.o

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.

Thank you in advance!

Soyvia

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.

Thank you in advance!

Soyvia

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]

I was able to make it work again on the last xcode version. Will need some time to polish the code before publishing though.

I was able to make it work again on the last xcode version. Will need some time to polish the code before publishing though.

Do you have a success in updating xcode plug-in?

Do you have a success in updating xcode plug-in?

Hi,

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 :)

Cheers

CUDA XCode Plug-in.zip (83.8 KB)

Hi,

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 :)

Cheers

And lo, from the ashes of corruption, a hero has arisen, and brought deliverance to the weary souls of the world!

And lo, from the ashes of corruption, a hero has arisen, and brought deliverance to the weary souls of the world!

Hi,

Configuration: CUDA 3.2 Xcode 3.2.5 and Mac Os X 10.6.5

Downloaded and rebuild the plugin.

Restart Xcode but the plugin is not recognized by Xcode.

I did something wrong or it doesn’t work for this version?

Thanks,

On Xcode 3.2.5 64bit with OSX Snow Leopard and latest updates it works fine for me. I used the attachments from post 29.

It would be cool to see this for Xcode 4 beta too.