47

I have a project which contains Geos and Proj inside it. Before Xcode 5 I compiled them with LLVM GCC 4.2 compiler, but in Xcode 5 DP I get an error about unsupported compiler. Choosing another compiler get to compilation errors depends on syntax. How can I fix this trouble?

3 Answers 3

233

Change your compiler for C/C++/Objective-C:

Xcode > Target > Build Settings > Build Options > Compiler for C/C++/Objective-C

Select Default compiler (Apple LLVM x.y)

Sign up to request clarification or add additional context in comments.

2 Comments

99 problems but a compiler ain't one
Default compiler (Apple LLVM x.y) in that x and y will be your Xcode LLVM version
1

If you are compiling from the command line (like I do when building GEOS and proj4) The following command will find the correct compiler for you and run it.

xcrun --sdk iphoneos clang

Or use iphonesimulator instead of iphoneos if you want to build for the sim.

1 Comment

do you add GEOS and proj4 as compiled static library? In my project they are attached as source code
-23

A) Stop using Xcode 5

or

B) Fix the errors in your code

I know you won't like that answer but Apple has stated their displeasure for GCC on many occasions and declared it a deprecated technology.

9 Comments

@BraveS You mean the switching the compiler one? If you read the question, OP indicates that they tried that already and got errors.
Sorry but this answer is useless. If I had the power, I'd remove it from the internets.
@wallacer You got a better one? ;) Apparently OP was ok with it since they accepted it...
@borrrden, (+) well done! all of those who voted to the other answer didn't read the question :) (still the other answer is the one that helped me...)
@Yossi Indeed, the other answer is helpful to 99% of people, however the person who asked this question is one of the other 1% haha.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.