1

OSX 10.8.3 で C++ ブースト グラフ ライブラリ (BGL) を使用する実行可能ファイルをコンパイルして実行できます。しかし、gdb または Xcode を使用してデバッグしようとすると、デバッガーは BGL ヘッダー ファイルで定義されたシンボルを見つけることができませんadjacency_list.hpp。ファイルを見て、さまざまな名前空間を試しました

boost::in_degree 
boost::detail::in_degree

しかし、デバッガーはシンボルを見つけることができませんでした。関数がインライン化され、情報が失われているようです。同じ結果で別の関数(add_vertex)を試しました。フラグを指定して CMake を使用してコードをコンパイルすると、-DCMAKE_BUILD_TYPE=Debug他のシンボルを出力できます。これを修正する方法を提案してください。

// Trying using 
(gdb) print boost::detail::in_degree
    No symbol "in_degree" in namespace "boost::detail".
(gdb) print boost::detail::in_degree(0, *pGraph)
    No symbol "in_degree" in namespace "boost::detail".
(gdb) print boost::in_degree(0, *pGraph)
    No symbol "in_degree" in namespace "boost".

// Trying using boost::
(gdb) pt boost::in_degree
    No symbol "in_degree" in namespace "boost".
(gdb) pt boost::in_degree(0, *pGraph)
    No symbol "in_degree" in namespace "boost".
4

0 に答える 0