Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

i'm migrating from linux machine to mac os x. I was used to write c++ application (for opengl and opencv application mainly) using vim as editor.

Now, i have installed XCode on a new 10.8 mac os x machine, and I read about some problems in installing a new g++, and i was wondering if i really need it, what are the main differences between llvm and g++, if i can use my old codes with no problems in Xcode, with my old makefiles, etc..

Do you have some advice?

share|improve this question
    
Feel free to edit in which problem you have or link to a summary of the problems. Keep in mind, we are not the place for programming expertise - but do allow basic usage questions and how to compile open source software. Feel free to flag this or ask on Ask Different Meta about where we draw the line between compiling open source and advising developers on choosing a compiler. –  bmike Jan 6 '13 at 20:54
add comment

closed as not a real question by Mark, bmike Jan 6 '13 at 20:54

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

In general g++ and llvm are different implementations of a C++ compiler, both run conforming c++03 programs and have different parts of C++11 implemented.

In general you code should work under both (it is a common way of debugging/checking code to compile code under differ compilers).

Your makefiles will need a slight change - if well written only in a few places to change the compiler to use the llvm one.

the main issue to note is that Linux is not Unix (and even then OSX is based on BSD) and so some of the system calls will change.

I would stick with llvm unless there is a well documented bug in the code that forces you to use gcc.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.