作者:bitowang
原作网址:http://blog.csdn.net/bitowang/article/details/7473691
make时报错:
- symbols.cc: At global scope:
- symbols.cc:137: error: ISO C++ forbids declaration of ‘hash_map’ with no type
- symbols.cc:137: error: expected ‘;’ before ‘<’ token
- symbols.cc:145: error: expected constructor, destructor, or type conversion before ‘<’ token
- symbols.cc: In constructor ‘context_t::context_t(Bit32u)’:
- symbols.cc:152: error: ‘map’ was not declared in this scope
- symbols.cc: In static member function ‘static context_t* context_t::get_context(Bit32u)’:
- symbols.cc:173: error: ‘map’ was not declared in this scope
- make[1]: *** [symbols.o] Error 1
- make: *** [bx_debug/libdebug.a] Error 2
解决方法:
- 在做make 之前, 需要在bx_debug/symbols.cc 的97『具体版本可能不一样』 行之后加上一些代码,加后如下所示:
- using namespace std;
- #ifdef __GNUC__ ( 新加的,注意前后都是两个下划线 )
- using namespace __gnu_cxx; ( 新加的,注意前面是两个下划线 )
- #endif ( 新加的)
- struct symbol_entry_t;