Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bronxbomber92

macrumors regular
Original poster
Nov 23, 2006
109
0
Hey, I'm trying to compile a project that contains ObjC++ and C++ files. The problem is that GCC is compiling the files as C/ObjC. The build log had this flag
Code:
-x objective-c
I know that is the problem, but I don't know how to change it (or where). I've looked in the project build settings and the target build settings, but I don't see that flag anywhere... Does anyone have any suggestions to fix this?

Thanks,
Jedd

Btw, I can upload the project if needed.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
Hi

You can use .cpp as well.

Under Project/Project Settings there is a Build Tab. In there there should be an option for 'Compile Source As'. On my system it's set as 'According to File Type', but I guess you could force it to C++.

Also under preferences File Types the file types for source code are under text/sourcecode… but I'm not sure what to do with them. I doubt that they would need 'fixing' anyway.

b e n
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.