0
나는 이것을 찾으려고 노력했지만 인터넷에는 정보가별로 없다. 하지만 premake를 사용하여 GNU makefile을 만들 때 pthread와 같은 OSX에서는 기본적으로 켜져 있지만 Linux에서는 사용할 수없는 링크 옵션이 있습니다.OSX와 Linux에서 g ++ 컴파일러의 주요 차이점은 무엇입니까?
어딘가에 관한 문서가 있다면 매우 유용 할 것입니다.
나는 이것을 찾으려고 노력했지만 인터넷에는 정보가별로 없다. 하지만 premake를 사용하여 GNU makefile을 만들 때 pthread와 같은 OSX에서는 기본적으로 켜져 있지만 Linux에서는 사용할 수없는 링크 옵션이 있습니다.OSX와 Linux에서 g ++ 컴파일러의 주요 차이점은 무엇입니까?
어딘가에 관한 문서가 있다면 매우 유용 할 것입니다.
주요 차이점은 엑스 코드 이외에 다른 소스로부터 컴파일러를 설치하지 않은 경우, 다음 OSX의 "g는 ++"아마 그 소리된다는 점이다 : 오류를 반환하지 않습니다 일반적으로 다른 오류 메시지를 제공하고
$ path -l g++ gcc
lrwxr-xr-x 1 root admin 23 Dec 6 2014 /opt/local/bin/g++ -> /opt/local/bin/g++-mp-5
-rwxr-xr-x 1 root wheel 18176 Jul 8 22:52 /usr/bin/g++
lrwxr-xr-x 1 root admin 23 Dec 6 2014 /opt/local/bin/gcc -> /opt/local/bin/gcc-mp-5
-rwxr-xr-x 1 root wheel 18176 Jul 8 22:52 /usr/bin/gcc
$ /usr/bin/g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ /usr/bin/gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
g ++와 동일한 경고에 대한 상태.
MacPorts 또는 homebrew를 통해 g ++를 설치 한 경우 차이점은 g ++ 릴리스의 차이로 인해 발생합니다.