[SDL] Can't use vector push_back with SDL

Peter Mulholland darkmatter at freeuk.com
Tue Aug 1 02:24:37 PDT 2006


Glenn McCord wrote:
> Thanks. I've compiled my own SDL and SDLmain and almost got everything 
> working. My SDL programs that use .push_back can now compile under 
> release mode but not under debug. That is despite using an SDLmain that 
> has been compiled as either debug or release. Have I interpreteded what 
> you've said correctly?
> 
> The error is
> 
> Error    1    error LNK2019: unresolved external symbol 
> __imp___CrtDbgReportW referenced in function "public: __thiscall 
> std::_Vector_const_iterator<int,class std::allocator<int> 
>  >::_Vector_const_iterator<int,class std::allocator<int> >(int *,class 
> std::_Container_base const *)" 
> (??0?$_Vector_const_iterator at HV?$allocator at H@std@@@std@@QAE at PAHPBV_Container_base@1@@Z)    
> main.obj   

This is strange. I guess you use a lot more of the STL than just this?

I wouldn't say this problem is related to SDL. If you create a simple 
command line project, can you use vector::push_back() there?

Sounds like it could be a bug in VS2005.

Pete.




More information about the SDL mailing list