1

ブースト ジオメトリのディゾルブはここで少し説明されています。今必要なのはその SVN ホームです、インクルードするとすぐに#include <boost/geometry/extensions/algorithms/dissolve.hpp>コンパイル エラーが発生します (エラー C4430、C2146、および C2061)=( パッチを提供できる人はいますか?

サンプルコードは、たとえばここにあります

エラー:

Error   2   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\users\avesta\desktop\cf\trunk\cloudserver\3rdparty\header-only\boost\geometry\extensions\algorithms\dissolve.hpp 67  1   CloudServer

Error   3   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\users\avesta\desktop\cf\trunk\cloudserver\3rdparty\header-only\boost\geometry\extensions\algorithms\dissolve.hpp 67  1   CloudServer

Error   1   error C2146: syntax error : missing ';' before identifier 'state_type'  c:\users\avesta\desktop\cf\trunk\cloudserver\3rdparty\header-only\boost\geometry\extensions\algorithms\dissolve.hpp 67  1   CloudServer

Error   4   error C2061: syntax error : identifier 'state_type' c:\users\avesta\desktop\cf\trunk\cloudserver\3rdparty\header-only\boost\geometry\extensions\algorithms\dissolve.hpp 76  1   CloudServer

最小限のコードは次のようになります (VS2010 では警告エラーで失敗することがテストされています):

#include <boost/geometry/extensions/algorithms/dissolve.hpp>

int main()
{
    return 0;
}
4

2 に答える 2

2

ここで私にとってはうまくコンパイルされます(clangとgccを使用):

$ clang++ -I /Volumes/EyeFive/Marshall/Sources/boost/trunk junk.cpp
$ clang++ --version
Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.2.0
Thread model: posix
$ g++ -I /Volumes/EyeFive/Marshall/Sources/boost/trunk junk.cpp
$ g++ --version
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ブーストトランクを使用。どのコンパイラ (およびそのコンパイラのどのバージョン) を使用していますか?

だから、答えはあなただと思います;-)

于 2011-11-09T02:25:29.280 に答える
1

ブーストトランクブランチは開発ブランチであり、常にコンパイルされるとは限りません。実際、状態は1時間ごとに変化します。安定したコンパイル可能なコードが必要な場合は、タグブランチの1つを使用します(例:http ://svn.boost.org/svn/boost/tags/release/Boost_1_47_0) 。

于 2011-11-08T19:40:48.197 に答える