example "uires" on the sdk
The example "uires" provided with the sdk 6.1.4 does not compile with Xcode5: I get the following error:
error: first parameter of ‘main’ (argument count) must be of type ‘int’
int C74_EXPORT main(void *moduleRef)
This issue is similar to one mentioned in an old post (http://cycling74.com/forums/topic/help-with-svg-image/). However, I don’t get a warning but an error here. Any clues about how to get rid of this?
Thanks in advance,
Your solution works however only for mac, not for windows. Ok, I’ll dive into it.
You won’t have the same problem on windows. It’s only xcode 5.0’s llvm compiler which is being picky.
Hi Emmanuel and all,
Since I didn’t want to have two separate sources for windows and mac, I searched a bit and found (hopefully) a way to compile again with the old LLVM-GCC4.2 on Xcode 5. It was a little bit tricky, I summarize the steps below for those who may be interested, until Max’SDK is updated:
1/ install LLVM-GCC4.2: I did that using macports, since the Fink and Homebrew do not seem to allow to build it in universal i386/x86_64 (and the homebrew version is somehow suspicious). I used the following command:
$ port install apple-gcc42 +universal +gpl3
This should install the compiler at /opt/local/bin/llvm-gcc-4.2
2/ allow Xcode 5 to compile with it. For this you have to install a plugin. I did the hard work, the plugin is attached to this post, you have to decompress it and put it into "/Applications/Xcode.app/Contents/Plugins/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/". Not sure if it’s 100% clean (I took an example on the web and modified it according to my needs), but it seems to work.
3/ In the build settings of the xcode project of the external (here "uires.xcodeproj"):
a/ "Compiler for C/C++/Objective-C" should be set to the new entry "LLVM-GCC 4.2"
b/ "Path to Linker Dependency Info File" should be unset (otherwise you get an error about ld not understanding "-dependency_info").
And here it goes, at least on my machine.
Forums > MaxMSP