Xcode 4 and CUDA - xcode

Is there any way Xcode 4 can compile or just read correctly CUDA code ?
Thanks

You must look at the following links :
Combining CUDA, Qt, and Xcode
Cude-Gdb guide
Also, a bit related : Can't Build a simple Cuda Program using Xcode !!!

For Xcode 3.2, I used the plugin posted in a thread in Nvidia Forum. I have just upgraded to Xcode 4.0 and cannot build my CUDA project anymore because all .cu files are not compiled. I guess a new build rule in an active target needs to be added.
(I will edit and add more details if I can fix this.)

Related

How Do I Delete A Target In Xcode 9?

Xcode 9 is quite similar to Xcode 8.
I'm building Apple's Open Source IOGraphicsFamily.
In the Products group there is a target called iogdiagnose. Its source produced many compiler errors when I tried to build all my targets, so I removed the group with iogdiagnose's source from my project.
But the iogdiagnose target is still there. It produces a link error - missing main.
Google failed to yield insight. There was the same question for Xcode 6.1, but Xcode 9 is quite different from 6.1.
Building the IOGraphicsFamily driver stack has been a huge PITA. I need my own build so I can enable the driver stack's kprintf logging.
Simply right-click on the target and click on Delete.
I deleted the target by editing the project.pbxproj that's in the .xcodeproj bundle.
That worked just fine however but there must a GUI to delete targets.
The great thing about Xcode is that Apple keeps us sharped-eyed by rearranging the GUI in profound ways with each new release.

Xcode 7 bitcode_strip error

My Xcode 7 beta3 project includes some framework compiled by Xcode 6, these frameworks are imported to my project by Embeded Frameworks option in "Build Phase" tab. Because these frameworks does not support bitcode, so the "Enable Bitcode" option turned to NO, when compile the project, Bitcode_strip error occurred:
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip
/Users/panzhansheng/Desktop/MusicFans_2.0.4_xcode7_autoplay/MusicFans/Frameworks/FLAC.framework/FLAC
-r -o /Users/panzhansheng/Library/Developer/Xcode/DerivedData/MusicFans-bxutvotiungdbwfsxloykffnqoqs/Build/Products/Debug-iphoneos/MusicFans.app/FLAC.framework/FLAC
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip:
input file must be a linked Mach-O file not an archive:
/Users/panzhansheng/Desktop/MusicFans_2.0.4_xcode7_autoplay/MusicFans/Frameworks/FLAC.framework/FLAC
(for architecture i386) error: bitcode_strip
/Users/panzhansheng/Desktop/MusicFans_2.0.4_xcode7_autoplay/MusicFans/Frameworks/FLAC.framework/FLAC:
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip
exited with 1
I found that the error happened when Xcode copy my frameworks to my App package and try to strip bitcode from the framework, but these frameworks were compiled by Xcode early version and did not include bitcode at all. How to fix this? Thanks!
As I found out, XCode uses bitcode-strip only when enviroment variable STRIP_BITCODE_FROM_COPIED_FILES is set to YES. It seems that it's set to YES by default when enable_bitcode is switched on.
Adding User-Defined Setting STRIP_BITCODE_FROM_COPIED_FILES=NO to your Target can help you, XCode will not use bitcode-strip, but your app which will use frameworks without bitcode section probably will not work. So it's better to recompile them also using STRIP_BITCODE_FROM_COPIED_FILES=NO if necessary.
Tested on XCode 7 beta 5
following up on M. Pogosskiy's answer, it took me awhile to track down where to put the STRIP_BITCODE_FROM_COPIED_FILES bit setting (not too familiar with these). for reference, here's an illustration:
It was due to low memory/ disk space available in Mac system. When I cleared it. It runs smooth without cleaning itself.

How can I find out which c++ compiler is Xcode 5 using?

I am currently writing c++ code and compiling using Xcode. I was wondering: How can I find out which c++ compiler is Xcode 5 using?
I would like to know that to make sure that the program I am writing is compilable on other computers that don't necessarily use the same compiler.
Thanks in advance!
You can also check your target's build settings to see what the current setting is. However, Xcode 5 only uses the LLVM 5.0 compiler. GCC is no longer used.
https://developer.apple.com/technologies/tools/features.html

fopen64 compile error under XCode with Cocos2D-X

I try to setup a new XCode Project for Cocos2D-x by myself, but I get an odd compile error in file cocos2dx/support/zip_support/ioapi.cpp, and XCode complains about the code using fopen64, ftello64 etc. My question is that is there any setting I need to set in order to make XCode compiled with these 64 bit functions? Thanks!
You can #define USE_FILE32API, preferably in your project settings. This is caused by the new version of minizip with 64-bit support.

How do I use gcc 4.5 in XCode 4?

I have install g++-4.5, as I'm interested in the C++0x stuff (done by sudo port install gcc45). Now I've made sure it's my default compiler (using gcc_select) and all of my Makefile projects do just fine compiling with 4.5.
Now I'm starting a project in xCode 4. How do I get the same C++0x features from within xCode, a.k.a. tell xCode to use g++-4.5?
These two bloggers describe hacking together an Xcode plugin to use one's own build of clang. I imagine you could use the same thing but substitute gcc 4.5's path.
http://belkadan.com/blog/2011/07/Using-Clang-from-SVN-in-Xcode/
http://shapeof.com/archives/2010/01/using_the_latest_llvm_with_xcode.html
I've been meaning to try, and found your question in my research.

Resources