如果你遇到以下情形:
(in .../src/bdd/test/, type "make")
> compiling: testBdd.cpp
> building: testBdd
../../../lib/libbdd.a(bddMgr.o): In function
`getBddNode(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)':
bddMgr.cpp:(.text+0x19b5): undefined reference to
`myStr2Int(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, int&)'
../../../lib/libbdd.a(bddMgr.o): In function
`BddMgr::drawBdd(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) const':
bddMgr.cpp:(.text+0x1d88): undefined reference to
`myStr2Int(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, int&)'
collect2: ld returned 1 exit status
make: *** [testBdd] Error 1
這是因為 libutil.a 還沒被建立起來。
一個簡單的方法是:
在 hw4_2 底下直接 make ==> libutil.a 就會建起來了。
然後再到 src/bdd/test 底下type make.