STLPORT的bug
當采用靜態連接,定義了:,_STLP_USE_STATIC_LIB
string的下面紅色代碼出錯,采用動態庫,卻沒有發現這個問題
template <bool __threads, int __inst>
void* _STLP_CALL
__node_alloc<__threads, __inst>::_M_allocate(size_t __n) {
void* __r;
_Obj * _STLP_VOLATILE * __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n);
// # ifdef _STLP_THREADS
/*REFERENCED*/
_Node_Alloc_Lock<__threads, __inst> __lock_instance;
// # endif
// Acquire the lock here with a constructor call.
// This ensures that it is released in exit or during stack
// unwinding.
if ( (__r = *__my_free_list) != 0 ) {
*__my_free_list = ((_Obj*)__r) -> _M_free_list_link;
} else {
__r = _S_refill(__n);
}
解決辦法:
使用動態庫的STLPORT
posted on 2009-07-16 16:52 肥仔 閱讀(632) 評論(0) 編輯 收藏 引用 所屬分類: Boost & STL