XCode and CUDA integration - xcode

Was just wondering if anyone has any experience working with CUDA and XCode? I'm having a nightmare setting it all up...
Dawson

I'm working with XCode, CMAKE & CUDA. No problems so far! Works like a charm, though you'll need to make sure, that XCode is using the gcc 4.0 instead of 4.2 (in case of 10.6).
I suggest you to also use CMAKE in combination with FindCUDA.cmake for generating the xcode project file. FindCUDA.cmake is here
There is also a plugin for XCode, making it recognize .cu files, found here in message #29. Also a good "tutorial" is given here, mentioning the plugin.

Related

Cinder + FreeImage + XCode

I am working on a project that uses Cinder for graphics, and for image loading, we are using FreeImage mainly for loading HDR images.
It is all working fine under windows, but now I am trying to build an OSX version I am hitting a snag.
First I tried to download and build FreeImage, but the makefiles are hopelessly outdated and do not work. I managed to fudge them and build the library, but when adding to xcode it didn't seem to link. The error was that the library was ignored because it was built with a different architecture. (I couldn't figure out how to fix this, but it is an option to go back to if all else fails).
Anyway, my next attempt was to use macports to install and build FreeImage. This all worked without error and I was able to include the library in my project.
However, the problem now it that I get many std linking errors. After searching around, it seems my problem is that freeimage was built with libstdc++, but cinder complains if I dont build my project with C++11.
So, is there any way of fixing this? Can I modify the make files macports uses to build freeimage? Or is there some other sneaky way? Any suggestions appreciated.
Sorry if this question is a bit parochial, but in my searches I have seen others with similar problems (but unfortunately few answers).

Build & Install OpenSceneGraph-3.1.3 give me a No WindowSystemInterface error?

I am trying to install the latest SVN Update OpenSceneGraph-3.1.4 on Mac OS X Mountain Lion.
Do I need to install a specific WindowSystemInterface ?
$ osgviewer cow.osg
View::setUpViewAcrossAllScreens() : Error, no WindowSystemInterface available, cannot create windows.
Viewer::realize() - failed to set up any windows.
I build and re-build many times, using CMake with or without Gui, compiling Unix files or from within Xcode, but still same problem.
Thank you!
If you'd like a more recent Mac OSG binary which includes a
user-runnable installer, OSG Frameworks supporting both 32 and 64-bit
archs, etc. you can use the one published by ARToolworks:
http://www.artoolworks.com/dist/openscenegraph/3.1.x/
It doesn't include the COLLADA (.dae) plugin but most other plugins
are present.
Regards, Phil.
It sounds like somehow the GraphicsWindow*.cpp file didn't compile and link and execute, as this is what provides the WindowSystemInterface. This is an unusual condition, as normally this is built automatically, linked in and executed as the library starts up and the user is never the wiser.
I'm not sure what to advise you, only to re-check you build process as something has gone very wrong.

Making Android NDK apps with NativeActivity?

I know that in a normal NDK build, the C++ libraries are built and packed into an apk file. But how can I automate this in Eclipse? I have tried following http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ to run the native-activity sample that came with the NDK, and it ended up not working. Even after I got past most of the reference errors via including, nothing happens when I run it as an Android Application (with a Motorola phone plugged in).
I have looked around quite a bit about this and am still stuck, so I'm open to suggestions at this point. Thanks!
(Please keep in mind that I'm using MinGW/MSys on Windows 7, mostly for running scripts with bash)
I've just decided to go with an Ubuntu VM and use that, and with some tweaking it seems to be working the way it should. I used a combination of http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ and http://developer.android.com/sdk/ndk/overview.html#native-activity to get everything set up. Also a very important note, go to C/C++ General -> Code Analysis -> Launching in your Eclipse project settings and disable both of those options for any native activities you make. I'm not sure if there's a good way to set the libs and includes up for it to work, but currently live bug checking screws things up in the NDK, and I can currently build successfully without it. Plus it'll still mark errors in red after a failed build, so you shouldn't be completely in the middle of nowhere when finding errors.

Adding a Library to your build and link path in XCode

I am tryingo to build a GUI application using the JUCE framework on MAC OSX.
I have dowloaded all the API's and got a small hello World program running fine.
However, when I add files to my Xcode project I get compilation errors that say that the Juce library files don`t exist. I would like to know how to get the library API in the build and link path in XCode so that it finds the neccesary files for compilation.
What I would do on Visual Studio going to properties and adding aditional library dependencies, is what I need to do in XCode but I don't know how.
Any help greatly appreciated.
thanks.
Old question but maybe a useful answer in the future....
If you have the "Hello World" up and runnning, it should already be linked to the library. Are you using the introjucer? This should help get everything up and running for you. If you are, you need to add classes etc to the introjucer, as this sets up Xcode / VStudio for you. If not, (Presuming XCode 3 as you are using leopard) goto Xcode > Preferences. Scroll along to source trees, and add the path to the juce folder in there.

Can't make Ada work with Xcode 3.2

I've been looking around the web for an hour and I'm just giving up to ask it here...
I've got to work under Ada. I managed to make gnat work as a command line to compile my files.
But I want to be able to have proper projects in Xcode. My problem is that I've found some templates on the to make ada default templates, I've copy pasted them a bit everywhere (/library/developer/ application support etc) but they never appear in the list when I want to create a project.
My other problem is that when I create an empty project and add a .adb file to it I can't compile at all... How do I specify that I should use gnat with it?
I'm sorry for all these questions if they are stupid but I can't find the answer...
Two alternatives that may be of interest: the Ada plugin modules for NetBeans and the Ada 05 Language Module for BBEdit 9.x and TextWrangler 2.x .
FWIW, templates live in /Developer/Library/Xcode in Xcode 3.1.4.
If you are using the XCode Ada Plugin from here, it looks like it was made to work with Xcode 3.0. You might try downgrading to that and see if you have any better luck.
Personally, my IDE of choice is Emacs, so I can't go into any real detail about XCode past that. I'd suggest talking to the MacAda mailing list if you don't get a good answer here.

Resources