Bochs 安装make时出错

作者: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; 


  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值