现在的位置: 首页 > 综合 > 正文

Bochs 安装make时出错

2014年10月01日 ⁄ 综合 ⁄ 共 958字 ⁄ 字号 评论关闭

作者:bitowang

原作网址:http://blog.csdn.net/bitowang/article/details/7473691

make时报错:

  1. symbols.cc: At global scope:  
  2.       symbols.cc:137: error: ISO C++ forbids declaration of ‘hash_map’ with no type  
  3.   
  4. symbols.cc:137: error: expected ‘;’ before ‘<’ token  
  5.   
  6. symbols.cc:145: error: expected constructor, destructor, or type conversion before ‘<’ token  
  7.       symbols.cc: In constructor ‘context_t::context_t(Bit32u)’:  
  8.       symbols.cc:152: error: ‘map’ was not declared in this scope  
  9.       symbols.cc: In static member function ‘static context_t* context_t::get_context(Bit32u)’:  
  10.       symbols.cc:173: error: ‘map’ was not declared in this scope   
  11.       make[1]: *** [symbols.o] Error 1    
  12.      make: *** [bx_debug/libdebug.a] Error 2 

解决方法:

  1. 在做make 之前, 需要在bx_debug/symbols.cc 的97『具体版本可能不一样』 行之后加上一些代码,加后如下所示:  
  2.   
  3. using namespace std;  
  4.   
  5. #ifdef __GNUC__  ( 新加的,注意前后都是两个下划线 )  
  6.   
  7. using namespace __gnu_cxx; ( 新加的,注意前面是两个下划线 )  
  8.   
  9. #endif  ( 新加的)  
  10.   
  11. struct symbol_entry_t; 

【上篇】
【下篇】

抱歉!评论已关闭.