how to use the vector in vc++.net 2005
-
hii i have created one windows forms application in vc++.net 2005 . where i want to use the vector i included #include also using namespace std; declare the vector as std::vectorvFile; int m_Number= 5 ; vFile.pushback(m_Number); i am getting the linker error like Error 1 error LNK2028: unresolved token (0A000380) "extern "C" int __cdecl _CrtDbgReportW(int,wchar_t const *,int,wchar_t const *,wchar_t const *,...)" (?_CrtDbgReportW@@$$J0YAHHPB_WH00ZZ) referenced in function "public: class std::_Vector_const_iterator<struct FileNames,class std::allocator<struct FileNames> > & __thiscall std::_Vector_const_iterator<struct FileNames,class std::allocator<struct FileNames> >::operator+=(int)" (??Y?$_Vector_const_iterator@UFileNames@@V?$allocator@UFileNames@@@std@@@std@@$$FQAEAAV01@H@Z) 9julyMATDOT.obj Please help me for resolving this.... Thanks in advance .... Anamika
-
hii i have created one windows forms application in vc++.net 2005 . where i want to use the vector i included #include also using namespace std; declare the vector as std::vectorvFile; int m_Number= 5 ; vFile.pushback(m_Number); i am getting the linker error like Error 1 error LNK2028: unresolved token (0A000380) "extern "C" int __cdecl _CrtDbgReportW(int,wchar_t const *,int,wchar_t const *,wchar_t const *,...)" (?_CrtDbgReportW@@$$J0YAHHPB_WH00ZZ) referenced in function "public: class std::_Vector_const_iterator<struct FileNames,class std::allocator<struct FileNames> > & __thiscall std::_Vector_const_iterator<struct FileNames,class std::allocator<struct FileNames> >::operator+=(int)" (??Y?$_Vector_const_iterator@UFileNames@@V?$allocator@UFileNames@@@std@@@std@@$$FQAEAAV01@H@Z) 9julyMATDOT.obj Please help me for resolving this.... Thanks in advance .... Anamika
That's a little bit odd. The function it can't find
CrtDbgReportW
is part of the C Runtime Library (various MSVCRT.dll and related bits depending on version). Check that your project is set to use it, Properties, Configuration Properties, C/C++, Code Generation, Runtime Library. Try the Multi threaded Debug /MTd option or one of the others if that gives you more/different errors."The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
-
That's a little bit odd. The function it can't find
CrtDbgReportW
is part of the C Runtime Library (various MSVCRT.dll and related bits depending on version). Check that your project is set to use it, Properties, Configuration Properties, C/C++, Code Generation, Runtime Library. Try the Multi threaded Debug /MTd option or one of the others if that gives you more/different errors."The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
thanks for your reply.... i tried changing the runtime libary to Multi threaded Debug /MTd but of no use .....
-
thanks for your reply.... i tried changing the runtime libary to Multi threaded Debug /MTd but of no use .....
In that case it looks like it might me an include path issue. I still think it odd that this STL code which is distributed as source seems to be requiring the definition of a C Runtime function that isn't part of the standard interface in order to compile. Something subtle/nasty is going on here. Are you trying to mix code from VC6 with VS2002 or later? Do you have the C Runtime source installed with your compiler (it's optional)? I'd start by checking where your build is pulling its STL and CRT header files from. Perhaps one is coming from a much later SDK and the other from a compiler installation :~
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)