i had fresh re-installation of mac os x yosemite before install xcode , commandlinetools.
seems have 2 versions of gcc , g++ in following 2 directories:
/usr/bin (both files 14kb) and
/library/developer/commandlinetools/usr/bin (g++ alias , gcc 19kb)
type "which gcc" in terminal gives me "/usr/bin/gcc", did "which g++" gives me "/usr/bin/g++", , means system use gcc , g++ in /usr/bin
so, questions are:
1. why have 2 versions of gcc , g++?
2. why gcc , g++ installed commandlinetools not specified default ones?
3. how ask mac os x point gcc , g++ in directory "/library/developer/commandlinetools/usr/bin"?
btw, installed commandlinetools according following:
http://railsapps.github.io/xcode-command-line-tools.html
however, got different output typing "gcc --version" (difference hightlighted):
configured with: --prefix=/application/xcode.app/contents/developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 apple llvm version 6.0 (clang-600.0.54) (based on llvm 3.5svn) target: x86_64-apple-darwin14.0.0 thread model: posix
... rather /library/developer/commandlinetools/usr shown in web page above ...
i'm quite confused gcc/g++ being used mac osx ...
currently, gcc , g++ in /usr/bin what's known shims. capable of automatically determining path respective utilities, , forwarding receive them. path can either command line tools directory mentioned above, or xcode.
Forums Macs macOS OS X Yosemite (10.10)
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
Comments
Post a Comment