views:

180

answers:

2

Hello, I have a project that has to be set to "Objective-C++" for the "compile source as" value (no, "according to file type" will not work in my main project). I am having a problem with a file I got from a framework (specifically OpenFeint) that has compile errors when compiled as "Objective-C++".

error: pointer of type 'void *' used in arithmetic

I can get the file to compile in a test project that is set to "according to file type" for the "compile source as" value. So I am wondering how to set a specific file to compile as Objective-C? If I can get this one file to compile as Objective-C in my real project, everything should work in perfect harmony.

Any help is appreciated.

Thanks!

+2  A: 

Right-click the file in the Groups and Files list in Xcode, and select Get Info from the contextual menu.

You can then change the type of the file in the General tab of the info window. You probably want the file to be of type sourcecode.c.objc.

Rob Keniger
A: 

The developer of OpenFeint got back to me and got me a pre-release of their next release. it fixes this problem.

I might add that they where very responsive.

EToreo
Technically, I did answer your question which was "How do I compile a file as a specific type", I think it's slightly unfair to mark the question as answered by yourself. Just sayin'.
Rob Keniger
I disagree. The questing clearly states "override for *specific file*" not "specific type".Thanks for your time though.
EToreo