私は現在、割り当て用の非常に単純なゲーム エンジンを作成しており、コードをより良くするために、ベクトル数学ライブラリを使用することにしました。私の講師の 1 人が、Bullet Physics エンジンで使用されている Sony Vector Math ライブラリを見せてくれました。Linux では問題なく動作していますが、OS X (intel、Snow Leopard) で動作するように移植するのに問題があります。プロジェクトにファイルを正しく含めましたが、ライブラリの C++ バージョンがコンパイルされないようです。ライブラリの C バージョンを動作させることはできますが、C++ バージョンに比べてかなり厄介な API があり、このライブラリを使用する全体的な理由は、そもそもコードをきれいにすることでした。
http://glosx.blogspot.com/2008/07/sony-vector-math-library.html
私が偶然見つけたこのブログ投稿は、コンパイラに何か問題があることを示唆しているようです? かなり短いので、そこから多くの情報を得ることができませんでした。
C++ バージョンを使用しようとすると、次のエラーが表示されます (各エラーの拡大ビュー)。
/usr/include/vectormath/cpp/../SSE/cpp/vectormath_aos.h:156:0
/usr/include/vectormath/cpp/../SSE/cpp/vectormath_aos.h:156:
error: '__forceinline' does not name a type
2 番目のエラー:
/Developer/apps/gl test/main.cpp:7:0 In file included from /Developer/apps/gl test/main.cpp
/usr/include/vectormath/cpp/vectormath_aos.h:38:0 In file included from
/usr/include/vectormath/cpp/vectormath_aos.h
/usr/include/vectormath/cpp/../SSE/cpp/vectormath_aos.h:330:0 In file included from
/usr/include/vectormath/cpp/../SSE/cpp/vectormath_aos.h
/usr/include/vectormath/cpp/../SSE/cpp/vecidx_aos.h:45:0 Expected constructor, destructor,
or type conversion before '(' token in /usr/include/vectormath/cpp/../SSE/cpp/vecidx_aos.h
最後に、main.cpp ファイルの最後に 2 つのエラーがあります。
Expected '}' at the end of input
Expected '}' at the end of input
私は自分の心をグーグルで検索しましたが、正しい方向に向けるための答えや何かを見つけることができないので、どんな助けも大いに受け取られます.
ありがとう、