Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Mar 19, 2007, 02:33 PM   #1
macrumors regular
Join Date: Nov 2006
Xcode project (GCC) is compiling my ObjC++ files as C

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
-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?


Btw, I can upload the project if needed.
bronxbomber92 is offline   0 Reply With Quote
Old Mar 19, 2007, 03:14 PM   #2
macrumors 6502
Join Date: Jul 2006
Did you give the files with Objective-C++ the .mm extension?
kpua is offline   0 Reply With Quote
Old Mar 19, 2007, 03:49 PM   #3
macrumors 6502a
Join Date: Sep 2005
Location: Cramlington, UK
Send a message via MSN to lazydog

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
lazydog is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
So it seems that 10.9 will come with XCode 5.0 and get rid of llvm-gcc altogether. iBug2 OS X 1 Jan 29, 2013 11:39 AM
How to ignore project files with xcode git ? mikezang iPhone/iPad Programming 1 Jan 7, 2013 04:14 AM
compiling VTK using Xcode ilantal Mac Programming 7 Jan 2, 2013 10:43 AM
Cross compiling for windows using Xcode e-r-a-n Mac Programming 3 Dec 2, 2012 12:58 PM
no gcc after installing xcode! help! urgent! miissts Mac Programming 4 Aug 28, 2012 09:00 AM

Forum Jump

All times are GMT -5. The time now is 01:47 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC