xcode 4.2 + xcode project from makefile - c++

I am trying to build c++ xcode application from makefile.
I am using xcode 4.2, and in this version i dont see command line utility->standard tool.. All the help says "If you are just trying to build a command-line utility, selectone of the tools—for example, Standard Tool."
I have installed command line tools from preferences->downloads->components
Can some one help me on this?

You should have "Command Line Tool" available when starting a new project in "OS X"->"Application". If you don't, try updating your softwares, including XCode.

Related

"g++" not found in PATH [mac/Eclipse/XCODE installed/CDT downloaded]

I get this error when I try to build a c++ project, however I can run cpp apps in Xcode, I've downloaded CDT for Eclipse, so the compiler must be installed.
echo $PATH:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
I'm using Mac, I've found posts saying download gcc or Xcode, or solutions for Windows, it's very frustrating that I can't find the answer for such an easy problem, so please… How can I set the PATH variable for my cpp projects in Eclipse?
This question should help. It looks like you need to install XCode command line tools separately to use compilers and build systems outside of XCode (e.g. on the command line or in Eclipse).

Command line Tools for Code Blocks

I'm trying to install the command line tools on Code::Blocks on my Mac, i have downloaded Xcode and tried to install their command line tools, but i get this error when I try to enter Apple's download page:
I've even tried downloading from code block preferences , but i don't get the option to:
Any Suggestions?
My main aim is just to have a C++ compiler working on my Mac, and I'm aiming to start developing C++ applications. Any further suggestions on this alternatively to Code::Blocks would help.
Thanks
Download xcode and install their command line tools. All of the xcode tools are generally updated well and easy to install

How can I compile and build a program using external library with command line tools come with Xcode?

I am coding a computer vision program, which is using OpenCV 2.4, by Xcode 4.4. I want to compile and make it in the Terminal by g++ or make command. But the system shows a lot of errors that the compiler cannot find the "opencv2/opencv.hpp" file and Vec3d, etc..!
My question is how to configure the system the I can make and build the code in Terminal? Thanks.
First, you need to have command line tools (I guess you already have it)
Bring up Preference in Xcode
Select "Downloads" tab
Select "Components' tab
Click 'install' on the command line tools line.
Then, you need to install OpenCV. I suggest to use Homebrew
setup homebrew, then
brew install opencv
It will install library in /usr/local, which is in g++'s standard lookup path, thus should be ok.
If you still need help, post the log file.

C++ Programming on a Mac

I have installed Xcode 4.0 (XCode Toolset, System Tools and Documentation components only), but have Netbeans with the C/C++ plugin. However when I try to create a new C++ project in Netbeans it tells me that no compiler was found on my system. The recommended course of action is to install Xcode, which I have done so.
How do I get Netbeans to recognize that I already have Xcode?
Most likely, you reinstall Xcode and this time don't uncheck the option that installs the compiler, etc. under /usr/bin for command line use. What's wrong with just having a full installation of Xcode?
If that doesn't work, it may be an incompatibility due to Xcode 4 installing to /Xcode4 instead of /Developer. You can fix that with a symlink or by installing Xcode 3.

XCode C++ source code print issue on Mac

I am using MacBook Pro Mac OS 10.5 with related version of XCode. I am new to this development environment. I am developing C++ console/terminal applications (File->New project, then from the list on the left "Command line utility", and on the right "C++ tool".).
For C++ source code file, I want to print source file content with line number. Any ideas how to do this?
thanks in advance,
George
I found this article A Recipe to Pretty-Print Your iPhone Source in Xcode it uses enscript which is installed by Apple for Xcode on Snow Leopard so no need for macports etc.
You can get linenumbers by passing -C as an argument to the enscript executable called in the shell script