Thread: C++ std routines

  1. #16
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I don't know siavoshkc.
    From all I know, the lib is there just for our convenience. Because it is precompiled we do have it added to our project at link-time. But this is just for convenience. It could be plain code added to our project at compile time.

    I was waiting on someone more informed to say something else.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #17
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    Right, we can add plain code to our project. But we don't have the plain code of cin.get(). It is in DLLs and libs. I am sure about this.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  3. #18
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >But we don't have the plain code of cin.get(). It is in DLLs and libs. I am sure about this.
    I have a research project for you and Mario that should prove educational. Go and find out what the difference is between template and non-template libraries in terms of linking with a single source file. In other words, barring compiler tricks with the header, find out whether the vector library is resolved at compile-time or link-time in this code:
    Code:
    #include <vector>
    
    int main()
    {
      vector<int> v;
    
      for ( int i = 0; i < 10; i++ )
        v.push_back ( i );
    }
    Once you have that answer, go and find out how some compilers implement and load standard headers and see if your previous result still applies. Finally, and this is where the project is relevant, determine if the vector library can be replaced with the iostream library to the same effect and you'll have your answer.

    Enjoy!
    My best code is written with the delete key.

  4. #19
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    I don't know why this article is going so complex. When we use a function or object that we have only its declaration in a header file and not its definition. Compiler also doesn't have its definition. Compiler generates an .obj file that has external references in it. In this time we have some obj files that are passed to the linker. Linker sees the external references and searches through all libs an objs to find the symbols needed. Now we have three conditions:
    1> Linker finds only one object with that name and puts it in our obj
    2> Linker can't find such object. Unresolved External Symbol error is the result.
    3> Linker finds more than one object with that name. An error again, Duplicate definition.

    After this if no error was generated during linking phase, linker makes an exe or DLL file. Ready to execute.
    Linking to DLLs are also done by linker.
    Some macros or functions maybe defined in headers, so its to compiler to make them work not the linker.

    Prelude, what should I do exactly?
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  5. #20
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    I tested vector. Resolved in link time.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  6. #21
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Compiler? Settings? In most scenarios, your test results are probably wrong.

    What Prelude is alluding to is right in its way, but still not specific enough. This is something that might differ from compiler to compiler, even from standard library to standard library. In addition VC++ has a weird setup that blurs the line between compiler and linker, so the answer might not make sense anyway.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #22
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    Test results are wrong?
    I disabled linker and watched the output text and see the unresolved references that one of them was a vector related object.

    What can be wrong with it?
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  8. #23
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Can you show me what you did? I'd be interested in your procedure and results.

    By wrong, I mean that I don't think your results would be the same for most compilers.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #24
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    I copied an pasted Prelude code into my IDE and compiled it. What did you expect? An error. So I added using namespace std;
    I disabled incremental linking.
    First I set an option VERBOSE for linker and show include for compiler. Linker outputed all its operations in IDE output window. Take look at it:
    Code:
    ------ Build started: Project: ConTest, Configuration: Debug Win32 ------
    Compiling...
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86
    Copyright (C) Microsoft Corporation.  All rights reserved.
    cl /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /FD /EHsc /RTC1 /RTCc /MDd /Fo"Debug\\" /Fd"Debug\vc80.pdb" /doc"Debug\\" /FR"Debug\\" /W4 /c /Wp64 /TP /showIncludes ".\ConTest.cpp"
    ConTest.cpp
    Note: including file: C:\Program Files\Microsoft Visual Studio 8\VC\include\vector
    Note: including file:  C:\Program Files\Microsoft Visual Studio 8\VC\include\memory
    Note: including file:   C:\Program Files\Microsoft Visual Studio 8\VC\include\iterator
    Note: including file:    C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility
    Note: including file:     C:\Program Files\Microsoft Visual Studio 8\VC\include\climits
    Note: including file:      C:\Program Files\Microsoft Visual Studio 8\VC\include\yvals.h
    Note: including file:       C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdefs.h
    Note: including file:        C:\Program Files\Microsoft Visual Studio 8\VC\include\sal.h
    Note: including file:        C:\Program Files\Microsoft Visual Studio 8\VC\include\crtassem.h
    Note: including file:        C:\Program Files\Microsoft Visual Studio 8\VC\include\vadefs.h
    Note: including file:       C:\Program Files\Microsoft Visual Studio 8\VC\include\use_ansi.h
    Note: including file:      C:\Program Files\Microsoft Visual Studio 8\VC\include\limits.h
    Note: including file:       C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdefs.h
    Note: including file:     C:\Program Files\Microsoft Visual Studio 8\VC\include\utility
    Note: including file:      C:\Program Files\Microsoft Visual Studio 8\VC\include\iosfwd
    Note: including file:       C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdio
    Note: including file:        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h
    Note: including file:         C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdefs.h
    Note: including file:         C:\Program Files\Microsoft Visual Studio 8\VC\include\swprintf.inl
    Note: including file:       C:\Program Files\Microsoft Visual Studio 8\VC\include\cstring
    Note: including file:        C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h
    Note: including file:         C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdefs.h
    Note: including file:       C:\Program Files\Microsoft Visual Studio 8\VC\include\cwchar
    Note: including file:        C:\Program Files\Microsoft Visual Studio 8\VC\include\wchar.h
    Note: including file:         C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdefs.h
    Note: including file:         C:\Program Files\Microsoft Visual Studio 8\VC\include\wtime.inl
    Note: including file:       C:\Program Files\Microsoft Visual Studio 8\VC\include\xstddef
    Note: including file:        C:\Program Files\Microsoft Visual Studio 8\VC\include\cstddef
    Note: including file:         C:\Program Files\Microsoft Visual Studio 8\VC\include\stddef.h
    Note: including file:          C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdefs.h
    Note: including file:       C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdbg.h
    Note: including file:        C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdefs.h
    Note: including file:   C:\Program Files\Microsoft Visual Studio 8\VC\include\xmemory
    Note: including file:    C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib
    Note: including file:     C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h
    Note: including file:      C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdefs.h
    Note: including file:    C:\Program Files\Microsoft Visual Studio 8\VC\include\exception
    Note: including file:     C:\Program Files\Microsoft Visual Studio 8\VC\include\eh.h
    Note: including file:      C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdefs.h
    Note: including file:     C:\Program Files\Microsoft Visual Studio 8\VC\include\malloc.h
    Note: including file:      C:\Program Files\Microsoft Visual Studio 8\VC\include\crtdefs.h
    Note: including file:    C:\Program Files\Microsoft Visual Studio 8\VC\include\new
    Note: including file:  C:\Program Files\Microsoft Visual Studio 8\VC\include\stdexcept
    Note: including file:   C:\Program Files\Microsoft Visual Studio 8\VC\include\xstring
    Linking...
    Microsoft (R) Incremental Linker Version 8.00.50727.42
    Copyright (C) Microsoft Corporation.  All rights reserved.
    /VERBOSE "/OUT:C:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\ConTest\Debug\ConTest.exe" /INCREMENTAL:NO /MANIFEST "/MANIFESTFILE:Debug\ConTest.exe.intermediate.manifest" /DEBUG "/PDB:c:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\ConTest\debug\ConTest.pdb" /MAP /SUBSYSTEM:CONSOLE kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib 
    ".\Debug\ConTest.obj" 
    Starting pass 1
    Processed /DEFAULTLIB:msvcprtd
    Processed /DEFAULTLIB:MSVCRTD
    Processed /DEFAULTLIB:OLDNAMES
    Searching libraries
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\kernel32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\user32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\gdi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\winspool.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\comdlg32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\advapi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\shell32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\ole32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\oleaut32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\uuid.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbc32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbccp32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\msvcprtd.lib:
          Found "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
            Referenced in ConTest.obj
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found "__declspec(dllimport) public: __thiscall std::_Lockit::~_Lockit(void)" (__imp_??1_Lockit@std@@QAE@XZ)
            Referenced in ConTest.obj
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found "__declspec(dllimport) public: __thiscall std::_Lockit::_Lockit(int)" (__imp_??0_Lockit@std@@QAE@H@Z)
            Referenced in ConTest.obj
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found "__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (__imp_?_Debug_message@std@@YAXPB_W0I@Z)
            Referenced in ConTest.obj
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ)
            Referenced in ConTest.obj
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
            Referenced in ConTest.obj
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)
            Referenced in ConTest.obj
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z)
            Referenced in ConTest.obj
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
            Referenced in ConTest.obj
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found "__declspec(dllimport) public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ)
            Referenced in ConTest.obj
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found __IMPORT_DESCRIPTOR_MSVCP80D
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found __NULL_IMPORT_DESCRIPTOR
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Loaded msvcprtd.lib(MSVCP80D.dll)
          Found MSVCP80D_NULL_THUNK_DATA
            Referenced in msvcprtd.lib(MSVCP80D.dll)
            Loaded msvcprtd.lib(MSVCP80D.dll)
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\MSVCRTD.lib:
          Found ___security_cookie
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(gs_cookie.obj)
          Found ___CxxFrameHandler3
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found @__security_check_cookie@4
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(secchk.obj)
          Found __RTC_CheckEsp
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(stack.obj)
          Found __RTC_Shutdown
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(init.obj)
          Found __CxxThrowException@8
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found "const type_info::`vftable'" (??_7type_info@@6B@)
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(ti_inst.obj)
          Found "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found "__declspec(dllimport) public: virtual __thiscall std::exception::~exception(void)" (__imp_??1exception@std@@UAE@XZ)
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
            Referenced in ConTest.obj
            Referenced in MSVCRTD.lib(ti_inst.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp___invalid_parameter
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp___CrtDbgReportW
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp__memmove_s
            Referenced in ConTest.obj
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found _mainCRTStartup
            Loaded MSVCRTD.lib(crtexe.obj)
          Found __IMPORT_DESCRIPTOR_MSVCR80D
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found ___report_gsfailure
            Referenced in MSVCRTD.lib(secchk.obj)
            Loaded MSVCRTD.lib(gs_report.obj)
          Found "void __cdecl _RTC_Failure(void *,int)" (?_RTC_Failure@@YAXPAXH@Z)
            Referenced in MSVCRTD.lib(stack.obj)
            Loaded MSVCRTD.lib(error.obj)
          Found __RTC_SetErrorFuncW
            Referenced in MSVCRTD.lib(init.obj)
            Loaded MSVCRTD.lib(userapi.obj)
          Found __CRT_RTC_INITW
            Referenced in MSVCRTD.lib(init.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@YGXPAXIHP6EX0@Z@Z)
            Referenced in MSVCRTD.lib(ti_inst.obj)
            Loaded MSVCRTD.lib(ehvecdtr.obj)
          Found "public: virtual __thiscall type_info::~type_info(void)" (??1type_info@@UAE@XZ)
            Referenced in MSVCRTD.lib(ti_inst.obj)
            Loaded MSVCRTD.lib(typeinfo_dtor_32.obj)
          Found __imp___configthreadlocale
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found ___globallocalestatus
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(xthdloc.obj)
          Found __setdefaultprecision
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(fp8.obj)
          Found __imp____setusermatherr
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __matherr
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(merr.obj)
          Found __setargv
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(dllargv.obj)
          Found __RTC_Initialize
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(initsect.obj)
          Found __adjust_fdiv
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(adjustfd.obj)
          Found __imp___adjust_fdiv
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __commode
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(xncommod.obj)
          Found __imp____p__commode
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __fmode
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(xtxtmode.obj)
          Found __imp____p__fmode
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found ___onexitbegin
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(atonexit.obj)
          Found __imp___encode_pointer
            Referenced in MSVCRTD.lib(crtexe.obj)
            Referenced in MSVCRTD.lib(atonexit.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp____set_app_type
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __amsg_exit
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp____getmainargs
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __dowildcard
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(wildcard.obj)
          Found __newmode
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(_newmode.obj)
          Found ___security_init_cookie
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(gs_support.obj)
          Found __imp___exit
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __XcptFilter
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp___cexit
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp__exit
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp____initenv
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp___CrtSetCheckCount
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __IsNonwritableInCurrentImage
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(pesect.obj)
          Found __initterm
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found ___xc_a
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(cinitexe.obj)
    Processed /DEFAULTLIB:kernel32.lib
     Processed /DISALLOWLIB:libc.lib
     Processed /DISALLOWLIB:libcd.lib
     Processed /DISALLOWLIB:libcmt.lib
     Processed /DISALLOWLIB:libcmtd.lib
     Processed /DISALLOWLIB:msvcrt.lib
          Found __initterm_e
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found ___native_startup_state
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded MSVCRTD.lib(natstart.obj)
          Found __except_handler4
            Referenced in MSVCRTD.lib(gs_support.obj)
            Referenced in MSVCRTD.lib(pesect.obj)
            Referenced in MSVCRTD.lib(crtexe.obj)
            Referenced in MSVCRTD.lib(error.obj)
            Referenced in MSVCRTD.lib(ehvecdtr.obj)
            Referenced in MSVCRTD.lib(atonexit.obj)
            Loaded MSVCRTD.lib(chandler4gs.obj)
          Found MSVCR80D_NULL_THUNK_DATA
            Referenced in MSVCRTD.lib(MSVCR80D.dll)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __crt_debugger_hook
            Referenced in MSVCRTD.lib(gs_report.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" (?_RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z)
            Referenced in MSVCRTD.lib(error.obj)
            Loaded MSVCRTD.lib(pdblkup.obj)
          Found "void __cdecl terminate(void)" (?terminate@@YAXXZ)
            Referenced in MSVCRTD.lib(ehvecdtr.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found "public: void __thiscall type_info::_type_info_dtor_internal_method(void)" (?_type_info_dtor_internal_method@type_info@@QAEXXZ)
            Referenced in MSVCRTD.lib(typeinfo_dtor_32.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __controlfp_s
            Referenced in MSVCRTD.lib(fp8.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __invoke_watson
            Referenced in MSVCRTD.lib(fp8.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __unlock
            Referenced in MSVCRTD.lib(atonexit.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found ___dllonexit
            Referenced in MSVCRTD.lib(atonexit.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __lock
            Referenced in MSVCRTD.lib(atonexit.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp___onexit
            Referenced in MSVCRTD.lib(atonexit.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __imp___decode_pointer
            Referenced in MSVCRTD.lib(atonexit.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
          Found __except_handler4_common
            Referenced in MSVCRTD.lib(chandler4gs.obj)
            Loaded MSVCRTD.lib(MSVCR80D.dll)
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\OLDNAMES.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\kernel32.lib:
          Found __imp__InterlockedExchange@8
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__Sleep@4
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__InterlockedCompareExchange@12
            Referenced in MSVCRTD.lib(crtexe.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__TerminateProcess@8
            Referenced in MSVCRTD.lib(gs_report.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__GetCurrentProcess@0
            Referenced in MSVCRTD.lib(gs_report.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__UnhandledExceptionFilter@4
            Referenced in MSVCRTD.lib(gs_report.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__SetUnhandledExceptionFilter@4
            Referenced in MSVCRTD.lib(gs_report.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__IsDebuggerPresent@0
            Referenced in MSVCRTD.lib(gs_report.obj)
            Referenced in MSVCRTD.lib(error.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__RaiseException@16
            Referenced in MSVCRTD.lib(error.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__DebugBreak@0
            Referenced in MSVCRTD.lib(error.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__WideCharToMultiByte@32
            Referenced in MSVCRTD.lib(error.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__MultiByteToWideChar@24
            Referenced in MSVCRTD.lib(error.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__lstrlenA@4
            Referenced in MSVCRTD.lib(error.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__GetProcAddress@8
            Referenced in MSVCRTD.lib(error.obj)
            Referenced in MSVCRTD.lib(pdblkup.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__LoadLibraryA@4
            Referenced in MSVCRTD.lib(error.obj)
            Referenced in MSVCRTD.lib(pdblkup.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__QueryPerformanceCounter@4
            Referenced in MSVCRTD.lib(gs_support.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__GetTickCount@0
            Referenced in MSVCRTD.lib(gs_support.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__GetCurrentThreadId@0
            Referenced in MSVCRTD.lib(gs_support.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__GetCurrentProcessId@0
            Referenced in MSVCRTD.lib(gs_support.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__GetSystemTimeAsFileTime@4
            Referenced in MSVCRTD.lib(gs_support.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__FatalAppExitA@8
            Referenced in MSVCRTD.lib(gs_support.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__HeapFree@12
            Referenced in MSVCRTD.lib(pdblkup.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__HeapAlloc@12
            Referenced in MSVCRTD.lib(pdblkup.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__GetProcessHeap@0
            Referenced in MSVCRTD.lib(pdblkup.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__GetModuleFileNameW@12
            Referenced in MSVCRTD.lib(pdblkup.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__VirtualQuery@12
            Referenced in MSVCRTD.lib(pdblkup.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __imp__FreeLibrary@4
            Referenced in MSVCRTD.lib(pdblkup.obj)
            Loaded kernel32.lib(KERNEL32.dll)
          Found __IMPORT_DESCRIPTOR_KERNEL32
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Referenced in kernel32.lib(KERNEL32.dll)
            Loaded kernel32.lib(KERNEL32.dll)
          Found KERNEL32_NULL_THUNK_DATA
            Referenced in kernel32.lib(KERNEL32.dll)
            Loaded kernel32.lib(KERNEL32.dll)
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\user32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\gdi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\winspool.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\comdlg32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\advapi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\shell32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\ole32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\oleaut32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\uuid.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbc32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbccp32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\msvcprtd.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\MSVCRTD.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\OLDNAMES.lib:
    Finished searching libraries
    Finished pass 1
    Searching libraries
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\kernel32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\user32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\gdi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\winspool.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\comdlg32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\advapi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\shell32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\ole32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\oleaut32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\uuid.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbc32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbccp32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\msvcprtd.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\MSVCRTD.lib:
          Found __load_config_used
            Loaded MSVCRTD.lib(loadcfg.obj)
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\OLDNAMES.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\kernel32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\user32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\gdi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\winspool.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\comdlg32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\advapi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\shell32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\ole32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\oleaut32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\uuid.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbc32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbccp32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\msvcprtd.lib:
    Finished searching libraries
    Starting pass 2
         ConTest.obj
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         kernel32.lib(KERNEL32.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         msvcprtd.lib(MSVCP80D.dll)
         MSVCRTD.lib(_newmode.obj)
         MSVCRTD.lib(xncommod.obj)
         MSVCRTD.lib(xtxtmode.obj)
         MSVCRTD.lib(xthdloc.obj)
         MSVCRTD.lib(atonexit.obj)
         MSVCRTD.lib(cinitexe.obj)
         MSVCRTD.lib(crtexe.obj)
         MSVCRTD.lib(dllargv.obj)
         MSVCRTD.lib(ehvecdtr.obj)
         MSVCRTD.lib(gs_cookie.obj)
         MSVCRTD.lib(gs_report.obj)
         MSVCRTD.lib(gs_support.obj)
         MSVCRTD.lib(merr.obj)
         MSVCRTD.lib(natstart.obj)
         MSVCRTD.lib(pesect.obj)
         MSVCRTD.lib(ti_inst.obj)
         MSVCRTD.lib(wildcard.obj)
         MSVCRTD.lib(adjustfd.obj)
         MSVCRTD.lib(chandler4gs.obj)
         MSVCRTD.lib(fp8.obj)
         MSVCRTD.lib(loadcfg.obj)
         MSVCRTD.lib(secchk.obj)
         MSVCRTD.lib(typeinfo_dtor_32.obj)
         MSVCRTD.lib(userapi.obj)
         MSVCRTD.lib(stack.obj)
         MSVCRTD.lib(pdblkup.obj)
         MSVCRTD.lib(initsect.obj)
         MSVCRTD.lib(init.obj)
         MSVCRTD.lib(error.obj)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
         MSVCRTD.lib(MSVCR80D.dll)
    Finished pass 2
    Embedding manifest...
    Generating XML documentation...
    Creating browse information file...
    Microsoft Browse Information Maintenance Utility Version 8.00.50727
    Copyright (C) Microsoft Corporation. All rights reserved.
    Build log was saved at "file://c:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\ConTest\ConTest\Debug\BuildLog.htm"
    ConTest - 0 error(s), 0 warning(s)
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
    After this I used /NODEFAULTLIB for linker and recompiled the code. This is the output window
    Code:
    Linking...
    Microsoft (R) Incremental Linker Version 8.00.50727.42
    Copyright (C) Microsoft Corporation.  All rights reserved.
    /VERBOSE "/OUT:C:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\ConTest\Debug\ConTest.exe" /INCREMENTAL:NO /MANIFEST "/MANIFESTFILE:Debug\ConTest.exe.intermediate.manifest" /NODEFAULTLIB /DEBUG "/PDB:c:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\ConTest\debug\ConTest.pdb" /MAP /SUBSYSTEM:CONSOLE kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib 
    ".\Debug\ConTest.obj" 
    Processed /NODEFAULTLIB (suppressing all default libs)
    Starting pass 1
    Searching libraries
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\kernel32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\user32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\gdi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\winspool.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\comdlg32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\advapi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\shell32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\ole32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\oleaut32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\uuid.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbc32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbccp32.lib:
    Finished searching libraries
    Finished pass 1
    Searching libraries
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\kernel32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\user32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\gdi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\winspool.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\comdlg32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\advapi32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\shell32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\ole32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\oleaut32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\lib\uuid.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbc32.lib:
        Searching C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib\odbccp32.lib:
    Finished searching libraries
    ConTest.obj : error LNK2019: unresolved external symbol ___security_cookie referenced in function _main
    ConTest.obj : error LNK2019: unresolved external symbol ___CxxFrameHandler3 referenced in function __ehhandler$_main
    ConTest.obj : error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in function __ehhandler$_main
    ConTest.obj : error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function _main
    ConTest.obj : error LNK2019: unresolved external symbol @_RTC_CheckStackVars@8 referenced in function _main
    ConTest.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
    ConTest.obj : error LNK2001: unresolved external symbol __RTC_InitBase
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Vector_val<int,class std::allocator<int> >::~_Vector_val<int,class std::allocator<int> >(void)" (??1?$_Vector_val@HV?$allocator@H@std@@@std@@QAE@XZ)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Lockit::~_Lockit(void)" (__imp_??1_Lockit@std@@QAE@XZ) referenced in function "public: __thiscall std::_Iterator_base::~_Iterator_base(void)" (??1_Iterator_base@std@@QAE@XZ)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Lockit::_Lockit(int)" (__imp_??0_Lockit@std@@QAE@H@Z) referenced in function "public: __thiscall std::_Iterator_base::~_Iterator_base(void)" (??1_Iterator_base@std@@QAE@XZ)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (__imp_?_Debug_message@std@@YAXPB_W0I@Z) referenced in function "public: void __thiscall std::_Iterator_base::_Orphan_me(void)" (?_Orphan_me@_Iterator_base@std@@QAEXXZ)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) referenced in function "protected: void __thiscall std::vector<int,class std::allocator<int> >::_Tidy(void)" (?_Tidy@?$vector@HV?$allocator@H@std@@@std@@IAEXXZ)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Vector_val<int,class std::allocator<int> >::_Vector_val<int,class std::allocator<int> >(class std::allocator<int>)" (??0?$_Vector_val@HV?$allocator@H@std@@@std@@IAE@V?$allocator@H@1@@Z)
    ConTest.obj : error LNK2019: unresolved external symbol __CxxThrowException@8 referenced in function __catch$?_Insert_n@?$vector@HV?$allocator@H@std@@@std@@IAEXV?$_Vector_iterator@HV?$allocator@H@std@@@2@IABH@Z$0
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) referenced in function "protected: static void __cdecl std::vector<int,class std::allocator<int> >::_Xlen(void)" (?_Xlen@?$vector@HV?$allocator@H@std@@@std@@KAXXZ)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) referenced in function "protected: static void __cdecl std::vector<int,class std::allocator<int> >::_Xlen(void)" (?_Xlen@?$vector@HV?$allocator@H@std@@@std@@KAXXZ)
    ConTest.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
    ConTest.obj : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::exception::~exception(void)" (__imp_??1exception@std@@UAE@XZ) referenced in function __unwindfunclet$??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z$0
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ) referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) referenced in function "public: virtual char const * __thiscall std::logic_error::what(void)const " (?what@logic_error@std@@UBEPBDXZ)
    ConTest.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function "public: virtual void * __thiscall std::logic_error::`scalar deleting destructor'(unsigned int)" (??_Glogic_error@std@@UAEPAXI@Z)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(class std::exception const &)" (__imp_??0exception@std@@QAE@ABV01@@Z) referenced in function "public: __thiscall std::logic_error::logic_error(class std::logic_error const &)" (??0logic_error@std@@QAE@ABV01@@Z)
    ConTest.obj : error LNK2019: unresolved external symbol __imp___invalid_parameter 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@HV?$allocator@H@std@@@std@@QAE@PAHPBV_Container_base@1@@Z)
    ConTest.obj : 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@HV?$allocator@H@std@@@std@@QAE@PAHPBV_Container_base@1@@Z)
    ConTest.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function "int * __cdecl std::_Allocate<int>(unsigned int,int *)" (??$_Allocate@H@std@@YAPAHIPAH@Z)
    ConTest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z) referenced in function "public: __thiscall std::bad_alloc::bad_alloc(char const *)" (??0bad_alloc@std@@QAE@PBD@Z)
    ConTest.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
    ConTest.obj : error LNK2019: unresolved external symbol __imp__memmove_s referenced in function "int * __cdecl std::_Copy_backward_opt<int *,int *,struct std::random_access_iterator_tag>(int *,int *,int *,struct std::random_access_iterator_tag,struct std::_Scalar_ptr_iterator_tag,struct std::_Range_checked_iterator_tag)" (??$_Copy_backward_opt@PAHPAHUrandom_access_iterator_tag@std@@@std@@YAPAHPAH00Urandom_access_iterator_tag@0@U_Scalar_ptr_iterator_tag@0@U_Range_checked_iterator_tag@0@@Z)
    LINK : error LNK2001: unresolved external symbol _mainCRTStartup
    LINK : error LNK2001: unresolved external symbol __load_config_used
    C:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\ConTest\Debug\ConTest.exe : fatal error LNK1120: 32 unresolved externals
    Build log was saved at "file://c:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\ConTest\ConTest\Debug\BuildLog.htm"
    ConTest - 33 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    This is what i've done.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  10. #25
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    No linker errors involving vector. That code was instantiated from templates and available in the object files. Your interpretation was quite simply wrong.

    Of course, you have other errors. std::vector seems to be implemented in terms of the non-template class _Container_base, which is missing its implementation. The specialization of basic_string with <char, std::char_traits<char>, std::allocator<char> > seems to be in the library as well, and thus is missing its implementation.
    But no errors involving std::vector itself.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  11. #26
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    I feel there is a point that I can't understand how can vector resolved by compiler when it doesn't have its source code?
    I commented two lines of the program that were using vector
    Code:
    #include <vector>
    using namespace std;
    int main()
    {
     // vector<int> v;
    
      for ( int i = 0; i < 10; i++ );
       // v.push_back ( i );
    }
    And recompiled it. There were only three link errors
    Code:
    ConTest.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
    ConTest.obj : error LNK2001: unresolved external symbol __RTC_InitBase
    LINK : error LNK2001: unresolved external symbol _mainCRTStartup
    So all the other errors are because of using vector.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  12. #27
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by siavoshkc
    I feel there is a point that I can't understand how can vector resolved by compiler when it doesn't have its source code?
    It does. That's the point. Look into your compiler's files, particularly <vector>.
    I don't have VS 2005, but in 2003, my vector file contains the complete implementation of std::vector, which in turn derives from std::_Vector_val, which is also completely contained.

    You'll probably find that in your file, it is implemented in terms of _Container_base or whatever it's called. That's not the case here.

    The unresolved externals come from functions your vector implementation uses, not from the implementation itself.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  13. #28
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    If vector is implemented in the header, with no doubt it is resolved by compiler.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  14. #29
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    I traced the execution of a code using std::cout, it was implemented in header files and some asm files.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  15. #30
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Still, don't forget that these results are compiler-specific, or even standard library-specific. The C++ standard specifies a feature called external templates, which would allow template implementations to reside in source files instead of headers.
    Due to the complexity of the feature, though, no compiler I'm aware of fully implements it. But if one did, it could use a standard library where the linker resolves std::vector.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why std:: and not using namespace std?
    By swappo in forum C++ Programming
    Replies: 4
    Last Post: 07-03-2009, 03:10 PM
  2. std:: or namespace std
    By C-+ in forum C++ Programming
    Replies: 16
    Last Post: 12-04-2007, 12:30 PM
  3. Builder 5 v's bcc32.exe
    By sononix in forum C++ Programming
    Replies: 3
    Last Post: 08-17-2004, 10:17 AM
  4. Site tutorials
    By Aalmaron in forum C++ Programming
    Replies: 20
    Last Post: 01-06-2004, 02:38 PM
  5. Special Allegro Information
    By TechWins in forum Game Programming
    Replies: 12
    Last Post: 08-20-2002, 11:35 PM