I am using Lion, Mac OX X 10.7.5 and Eclipse Juno to try and learn to program using C++. I created a new project using the hello world template. When I tried running the hello world program I got 3 errors:
Program "make" not found in PATH
Program "gcc" not found in PATH
Program "g++" not found in PATH
I have Xcode downloaded also. I selected the toolchain MACOSX GCC.
Once you downloaded Xcode, you also need to download the command line tools package from within Xcode which will install the necessary make program and clang compiler.
To download it go to Xcode >> Preferences >> 'Downloads Tab' and install Command line tools.
Related
I don't have Xcode installed on my Mac OS 13.6 but I would like to run c++ on vs code. Is there a way to do that without the need for Xcode to be installed? Also, can I run an older version of Xcode and run c++ without problems?
Note: Would be great if someone posted a link for a tutorial.
You may download and install LLVM 13.0.1 for Darwin or a small part of Xcode, Xcode command line tools: xcode-select --install.
Both will result in installing clang++.
I'm running Mountain Lion and I've installed QT Library 4.8
From this page...
Qt libraries 4.8.4 for Mac (185 MB)
I've also installed Qt Creator 2.6.1 for Mac (Intel 32/64bit) (51 MB) from the same page.
When I attempt to run, I get this error:
18:14:01: Could not start process "make" -w Error while
building/deploying project WebBrowser (target: Desktop) When executing
step 'Make'
I will include my build setup in three screenshots
Any ideas?
It seems like you didn't install the UNIX command line tools package of XCode. Install that and it should work. See here on how to install the UNIX tools in XCode:
https://stackoverflow.com/a/9329325/856199
There are also stand-alone versions of the UNIX command line development tools if you don't want to install XCode. You can find them here:
https://developer.apple.com/downloads/index.action
Look for "Command Line Tools (OS X Mountain Lion) for XCode". Get the latest version.
I've been developing with C++ in VS2010 but now I am trying to convert
my apps to build and run under Linux. So I've installed Eclipse Indigo
and the CDT package on an Ubuntu linux machine.
When I create the stock "Hello World"-project for C++, I get the
classic "Binary not found" error message. I've combed the internet,
but found no solution.
Through my findings I have gone to:
Project -> Properties -> C/C++ Build -> Tool Chain Editor
and changed the Current Toolchain from Linux GCC to MinGW GCC.
But after rebuilding the project I still have the same error message.
Any suggestions?
The gcc package doesn't necessarily include the C++ compiler. Try:
whereis g++
on the commandline (or g++ -v) to check if it is installed...
Trying to run a simple Hello World C++ program on Eclipse (Galileo) CDT plugin on Windows Vista. Following the "Before You Begin" instructions for Eclipse/CDT...
1) Downloaded and installed the latest Cygwin. However, could not compile with Cygwin.
Internal Builder: Cannot run program "g++": Launching failed
the Eclipse CDT docs say...
currently Cygwin >= version 3.4.4-999 is not supported since gcc and g++ commands cannot >be launched from the windows' native shell
It seems to be a typo (Cygwin version is at 1.7.7) but running cygcheck -c, I get the version of g++ which is 3.4.4.x.
Hence I assumed that this version of g++ cannot be run from the command line. So gave up on Cygwin.
2) Downloaded and installed MinGW, gdb, MSYS.
This time, it was able to compile, but when trying to run, I get a popup saying that
the program Hello.exe has stopped working
You should use either Cygwin, or Mingw, because their dll's might conflict if they're both discoverable via %PATH%.
Show your build process (copypaste text from your build console) and %PATH% contents.
The simplest solution was to install the latest Eclipse (Helios SR1) and the CDT plugin.
I needed to also delete the old projects/import old source into new projects.
For Galileo, see:
http://sourceware.org/ml/cygwin/2010-03/msg00510.html
http://dreamlayers.blogspot.com/2010/01/eclipse-incompatibility-with-cygwin-17.html
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