Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode "compile source as" override for specific file

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!

like image 226
EToreo Avatar asked Jan 23 '23 16:01

EToreo


1 Answers

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.

like image 175
Rob Keniger Avatar answered Jan 26 '23 07:01

Rob Keniger