Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Using Xcode's C/Cpp Compilers,Make, and Debugger Commands

Hello,

I am trying to configure a copy of Netbeans for use on my Macbook Pro running Snow Leopard. I installed the XCode directories today and I am trying to point Netbeans to the right C Compiler, C++ Compiler, Assembler, Make Command, and Debugger Commands that were provided with XCode. I have pointed it to the following locations but Netbeans doesn't even understand the #include directive. I've included the Netbeans parameters that I have to fill in as well as the directory with the Apple llvm XCode compilers. Thank you so much for your help.

User uploaded file
User uploaded file

If someone could please tell me which of these compilers need to go where to allow Netbeans to compile C/C++ code and also help me figure out how to fill out the "Assembler", "Make Command", and "Debugger Command" I would be very grateful.

Thanks,

Evan

MacBook Pro, Mac OS X (10.6.8)

Posted on Nov 22, 2011 4:53 PM

Reply
Question marked as Best reply

Posted on Nov 22, 2011 11:30 PM

Since Xcode puts symbolic links in the standard Unix directories, and since the tools are smart enough to call the correct variants when required, why not just use (assuming from your graphics that you want to use the LLVM frontend to the GNU toolchain):


/usr/bin/llvm-gcc (C Compiler)

/usr/bin/llvm-g++ (C++ Compiler)

/usr/bin/make (Make)

/usr/bin/gdb (Debugger)


Or, if you didn't install the Unix development tools and just the Xcode tools, use:


/Developer/usr/bin/llvm-gcc

etc, etc.


This also has the advantage that you won't break your tools every time you update Xcode.


Finally, you do realize that you only need to provide an assembler if you are actually writing Assembly Language code that needs to be compiled (similarly to how you only need to provide a Fortran compiler if you are going to be writing and compiling Fortran...).

2 replies
Question marked as Best reply

Nov 22, 2011 11:30 PM in response to ekovanis

Since Xcode puts symbolic links in the standard Unix directories, and since the tools are smart enough to call the correct variants when required, why not just use (assuming from your graphics that you want to use the LLVM frontend to the GNU toolchain):


/usr/bin/llvm-gcc (C Compiler)

/usr/bin/llvm-g++ (C++ Compiler)

/usr/bin/make (Make)

/usr/bin/gdb (Debugger)


Or, if you didn't install the Unix development tools and just the Xcode tools, use:


/Developer/usr/bin/llvm-gcc

etc, etc.


This also has the advantage that you won't break your tools every time you update Xcode.


Finally, you do realize that you only need to provide an assembler if you are actually writing Assembly Language code that needs to be compiled (similarly to how you only need to provide a Fortran compiler if you are going to be writing and compiling Fortran...).

Nov 23, 2011 10:36 AM in response to g_wolfman

Thanks so much! I realized that my problem was that I wasn't using the right version of the Xcode tools package for Snow Leopard (OSx 10.6.8) and that's why my install disk wasn't allowing me to install the UNIX Development Tools (the option was grayed out). So I found the right disk, got those installed, and the program is compiling and running now! Thank you so much for your help. Cheers!

Using Xcode's C/Cpp Compilers,Make, and Debugger Commands

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.