Mac で C++ プログラムの「クリーン」ビルドを実行しようとしています。クリーンとは、明示的に指定していないものを含めないことを意味します。
私の gcc インストールは次の場所にあります。
/Applications/gcc471/
これまでのところ、次を使用してコンパイルできます
-nostdinc++
含めることによって
GPP-INCLUDES += -I/Applications/gcc471/include/c++/4.7.1/
GPP-INCLUDES += -I/Applications/gcc471/include/c++/4.7.1/x86_64-apple-darwin12.0.0
そしてやっている
g++ -c *.cpp $(GPP-INCLUDES) -nostdinc++
私はそれでかなり満足しています。ただし、私はコンパイルに飛躍しようとしています
-nostdinc
そして、私が含めたパスの数に関係なく、
/usr/local/include
/usr/include
....
次のようなエラーが大量に発生します。
/Applications/gcc471/include/c++/4.7.1/tr1/cmath: At global scope:
/Applications/gcc471/include/c++/4.7.1/tr1/cmath:156:11: error: ‘::double_t’ has not been declared
/Applications/gcc471/include/c++/4.7.1/tr1/cmath:157:11: error: ‘::float_t’ has not been declared
/Applications/gcc471/include/c++/4.7.1/tr1/cmath:160:11: error: ‘::acosh’ has not been declared
...
-nostdinc を使用して、Mac 上でゼロから cpp プログラムを完全に構築する方法を知っている人はいますか?