Are C++ stnadard routines like std::cout wrriten using C liberary functions like fgets()?
Printable View
Are C++ stnadard routines like std::cout wrriten using C liberary functions like fgets()?
cout is an object representing an output stream, so a function like fgets has no real place there. What you may be thinking of is cin.getline, which has a couple of signatures. This one:
istream& getline( char* buffer, streamsize num, char delim );
acts the most like fgets, so it's probably implemented that way.
>Are C++ stnadard routines like std::cout wrriten using C liberary functions like fgets()?
Possibly, but not likely. It's easier (not really, but it's *better*) to work through a lower level API than to use a middle man.
[>>>>>>>>>>>>>>>>>>>>>>>>>>>EDITED<<<<<<<<<<<<<<<<< <<<<<<<<]
I read in msdn that fgets() and similar functions are standard in C Run-Time liberary. The CRT functions should be platform independent (Am I right?), so the lowest level of platform independent functions are fgetc(), _putw(), _getch(), _setmode(), etc. Am I right?
If C++ std liberaries like iostream has their own low level rutines and does not use C rutines, then why msdn Run-Time liberary reference is full of C rutines?
Another point: When we use Win32 API for creating a file for example. Some very low level rutines that are written by microsoft and are in kernel32.dll for example execute. These low level rutines does not use C or C++ std libraries to do their job. Am I correct?
Now if we imagine that Windows don't prophibit us from executing low level rutines and I want to write a program that formats a hard drive, am I beyond the OS hardware abstraction layer?
How Partition Magic formats a drive for example? What rutines does it use?
If you feel my questions are stupid or confuzing please tell me to explain more. It is very important for me to find the correct answers.
> Maybe I should ask how fgets() works? What rutines does it use?
Whatever the current platform has to offer probably.
Consider the std:: the nice level concrete on which you build your house.
Underneath, there is the whole jaggy mess of the current platform, but you don't need to know about that. In some places it can be quite thin, but in other places it could be much thicker.
I've edited my last post. So please read it again.
Platform independence in C++ just means that the interface will be the same across platforms. You can find the same functions that will do the same thing on any platform that has a conforming compiler. That does not mean that the functions are all implemented in the same way.
So the C and C++ standard libraries are both platform independent in their interfaces, but they both can be (and are) implemented differently on different platforms. Sometimes they are implemented in terms of each other, sometimes they are implemented with platform specific functions, sometimes they are implemented with platform specific assembly.
The C runtime library is available to C++ programmers if they choose to use it, which is why it is covered in MSDN, just like the C++ standard library.
OK. So for example when I use std::cin.get() in my code, the real code that will be replaced by a linker or (if its body is in a DLL and will be executed in RunTime) can be different in each platform. The standard is only for the arguments, return value and the duty of the function, the body can be different.
Am I correct?
How Partition Magic formats a drive for example? How OS let him do its job?
That is correct... in a way. It's at compile-time, not linking-time.
In the context of this discussion, i'm defining a C++ implementation as the combination of the compiler, linker and standard library (including the STL). Your implementation is portable if it conforms to the ISO C++ specifications. These specifications rule the language syntax and how the entities of the standard library should be presented to the user (we, the coders).
If an implementation changes these rules, it is not portable. For instance, if the syntax for a function declaration was altered by some implementation to function_name return_type(arglist,...); instead of the ISO defined return_type function_name (arglist,...);, this implementation would not be portable across other implementations.
On another implementation that conformed to ISO C++, that change would be caught at compile time and flagged as an error.
If the implementation overloaded getline() to include yet a new declaration with different parameters than those already defined in the standard library, the same would happen if the user decided to code with the new getline function and compile his code on another implementation.
However, despite being not portable across implementations, it could still be portable across systems. That implementation (assuming it was a Win32 one) could have a corresponding one for Linux, and Solaris, and DEC,...
That level of portability (portability across systems) is achieved by the implementation provider in how he coded the standard library (STL included). It is obvious that a std::cout cannot work the same way in windows, linux, Macintosh,... However, to the user it must look like so. Regardless of the system the user is coding for, std::cout syntax must be the same. The code that implements std::cout, on the other hand, is necessarily different.
But the code of std::cout is "added" at compile time. Not linking time.
>>How Partition Magic formats a drive for example? How OS let him do its job?
Partition Magic does not use either C or C++ standard functions for that because there are no such standard functions. It will have to go directly to the os api system calls, such as win32 api functions. I don't know which specific functions because I've never attempted to format a drive in a win32 program. Those os-specific functions can be called just like any of the standard c or c++ functions, just include the correct header file(s) and libraries. For win32 api functions, see www.msdn.microsoft.com or your compiler's online help files for win32 api functions.
Why at compile time? std::cout has external linkage and should be linked after compilation.Quote:
But the code of std::cout is "added" at compile time. Not linking time.
If I foun out correctly there are some functions in WinIoCtl.h that can do such things. Is it possible to write own code for formatting and partitioning?
Yes it is. ASM is your friend and worst nightmare.
The linkage type regulates the visibility of a name. Not if that name is added during compile or link-time.
External linkage names are those names that are visible from every translation unit of a program (global objects, extern const objects, classes...)
An Internal linkage name is a name that is local to the translation unit where it was declared (non extern const objects, names declared inside namespaces, static objects,...).
No linkage objects are all those names local to the scope in which they were declared, but not visible across the entire translation unit (local variables, enumerators declared inside a function, classes defined inside a function,...)
OK maybe I should use the term external refference. But I thought std::cin is in a lib and should be linked by linker to .obj. Or is in a DLL.
Yoy know, cin.get() is not an intrinsic function. I am now really confuzed.
If I am wrong please correct me (above post).
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.
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.
>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:
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.Code:#include <vector>
int main()
{
vector<int> v;
for ( int i = 0; i < 10; i++ )
v.push_back ( i );
}
Enjoy! :)
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?
I tested vector. Resolved in link time.
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.
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?
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.
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:
After this I used /NODEFAULTLIB for linker and recompiled the code. This is the output windowCode:------ 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 ==========
This is what i've done.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 ==========
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.
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 vectorAnd recompiled it. There were only three link errorsCode:#include <vector>
using namespace std;
int main()
{
// vector<int> v;
for ( int i = 0; i < 10; i++ );
// v.push_back ( i );
}
So all the other errors are because of using vector.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
It does. That's the point. Look into your compiler's files, particularly <vector>.Quote:
Originally Posted by siavoshkc
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.
If vector is implemented in the header, with no doubt it is resolved by compiler.
I traced the execution of a code using std::cout, it was implemented in header files and some asm files.
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.
>>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.
Can you explain me why it is complex?
[EDIT]
From the posts I got, I made another question: Does C Standard Liberary use Windows API to do its work in Windows environment?
The short answer is yes. The long answer is that the source code for the c standard library is probably on your machine, check: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\crt\src, or some similar directory, depending on which version of Visual Studio you are running.Quote:
Does C Standard Liberary use Windows API to do its work in Windows environment?
The classical compile process looks like this: first, you take each .cpp file, preprocess it (and thus add all the .h files) and compile it to an object file (.o or .obj, typically).Quote:
Originally Posted by siavoshkc
Then, you take these object files and link them together.
With the extern template feature, this doesn't work. The compiler needs to instantiate templates, and it needs to know about the usage of the templates to know with which types to instantiate them. That's why, currently, all code of templates must be in the headers: so that the compiler can instantiate them upon their use.
If you want to have them in completely independent files, the compiler must keep statistics about which templates are implemented where, and how they are used. Upon each template use, the compiler would have to find out where the template is implemented, see if it has already been instantiated with that specific type, if it hasn't been, parse the template implementation and instantiate it, then record the instantiation in the statistics. Or alternatively, it could, upon coming across a template implementation, save it to a temporary file, upon encountering an instantiation log that, and after everything else is done, look at the instantiation log and create all instantiations. Of course, if one of the templates in turn uses another, that must be handled too.
So you see, it's a significant deviation from the current model and thus very complex to implement. And leaving aside the compiler and linker themselves, you have to consider build tools that need to handle all those files the compiler generates: does it create one object file per instantiation, or one object file for all instantiations of a template? What should be done with the statistics files?
And I'm still oversimplifying. Only those parts of a template class that are actually used get instantiated. A compiler must record each single function individually, not whole template classes at once.
That's what I can tell you from the viewpoint of a C++ programmer who excels in theory and has done a bit of compiler development - a real compiler developer could probably tell you even more.
Thanks CornedBee.
I will look at /src.