I made this program to duplicate an error I'm receiving. When I run the program I receive:
I've looked up information about LNK2019 and LNK2001 in multiple forums, on MSVC, and other websites, but the information didn't really seem to apply.Code:Snake.obj : error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: __thiscall std::_Vector_const_iterator<short,class std::allocator<short> >::_Vector_const_iterator<short,class std::allocator<short> >(short *,class std::_Container_base_secure const *)" (??0?$_Vector_const_iterator@FV?$allocator@F@std@@@std@@QAE@PAFPBV_Container_base_secure@1@@Z)
Does anyone have any ideas? Thanks!Code:#pragma comment(lib, "SDL.lib") #pragma comment(lib, "SDLmain.lib") #pragma comment(lib, "SDL_TTF.lib") #pragma comment(lib, "SDL_image.lib") #include <vector> #include <string> #include "SDL.h" #include "SDL_TTF.h" #include "SDL_image.h" using namespace std; class Test { public: Test(); private: vector<vector<short>> myvar; }; Test::Test() : myvar () { //Uncommenting these two lines, //it will report LNK2001 instead of LNK2019 //vector<short> test (2, 10); //this->myvar.push_back(test); myvar.resize(1); } SDL_Event testevent; int main( int argc, char* args[] ) { bool genericloop = true; while( genericloop ) { SDL_PollEvent( &testevent ); if ( testevent.type == SDL_QUIT ) genericloop = false; } return 0; }
-Aaron




Reply With Quote