Tuesday, July 23, 2013

Eclipse+CDT

Two days of work, finally makes it work for Eclipse+CDT。
If you want to use your own makefile, create new project -> c++ project -> Makefile Project -> empty project.

If you want to debug, you need to compile with g++ -g in makefile.

When you debug in Eclipse, if something is wrong, it can be show in the Console, choose gdb or gdb traces view.

In the trace, you will know where is the error: such as:

058,863 306^done,stack=[frame={level="0",addr="0x000000000040593e",func="std::vector<std::vector<dou\
ble, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >::size\
",file="/usr/include/c++/4.6/bits/stl_vector.h",fullname="/usr/include/c++/4.6/bits/stl_vector.h",li\
ne="571"},frame={level="1",addr="0x000000000040506e",func="std::vector<std::vector<double, std::allo\
cator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >::vector",file="/usr\
/include/c++/4.6/bits/stl_vector.h",fullname="/usr/include/c++/4.6/bits/stl_vector.h",line="279"},fr\
ame={level="2",addr="0x0000000000404b21",func="NodeVector::getVector",file="NodeVector.h",fullname="\
/home/ying/study/SocialNetwork/ConstParse/SVMKernelCV2/NodeVector.h",line="32"},frame={level="3",add\
r="0x0000000000413d62",func="compute_matrices_for_optimization",file="svm_learn.cpp",fullname="/home\
/ying/study/SocialNetwork/ConstParse/SVMKernelCV2/svm_learn.cpp",line="1967"},frame={level="4",addr=\
"0x0000000000413a6b",func="optimize_svm",file="svm_learn.cpp",fullname="/home/ying/study/SocialNetwo\
rk/ConstParse/SVMKernelCV2/svm_learn.cpp",line="1900"},frame={level="5",addr="0x0000000000412a5f",fu\
nc="optimize_to_convergence",file="svm_learn.cpp",fullname="/home/ying/study/SocialNetwork/ConstPars\
e/SVMKernelCV2/svm_learn.cpp",line="1644"},frame={level="6",addr="0x000000000040ebe5",func="svm_lear\
n_classification",file="svm_learn.cpp",fullname="/home/ying/study/SocialNetwork/ConstParse/SVMKernel\
CV2/svm_learn.cpp",line="835"},frame={level="7",addr="0x0000000000402b69",func="main",file="svm_lear\
n_main.cpp",fullname="/home/ying/study/SocialNetwork/ConstParse/SVMKernelCV2/svm_learn_main.cpp",lin\
e="110"}]

No comments:

Post a Comment