|
Thanks Matthew,
I agree with 1 but confused about 2. I have checked that for header files like vector and string, it should contain all implementations required, why need additional library implemented in msvcp90d.dll? Could you show me an example please why the header file like string/vector is not enough and additional source are needed (and the sources are built into library msvcp90d.dll)?
regards,
George
|
|
|
|
|
string and vector are fine as just headers, STL is designed that way. I can't remember at the moment which things require the Dll, the best way to find out is to open it with Depends.exe and look at the exports...
...Hmm that doesn't work too well either as msvcp imports loads of stuff from msvcrt and then exports some of it along with lots of things like char_traits that can be used by just including the headers. I'll have to look into it further as I'm writing my own C++ Runtime. Lets us know if you find out
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Thanks Matthew,
Using depends to see exports of msvcp90d.dll -- there are a lot of functions, looks like all STL functions are exported! I think file vector/string is not just a header file, but also contain implementations inline, so I do not think there are anything missing. I do not know why need an additional DLL. Any comments?
regards,
George
|
|
|
|
|
George_George wrote: why need additional library implemented in msvcp90d.dll?
Don't know. Why you need to ask here rather than read the documentation on the subject?
led mike
|
|
|
|
|
Hi led mike,
I have not found any formal document mentioning what is the function of msvcp90d.dll, document just said it is for STL standard library, but as we can see all STL stardard library code are provided in source format, like file vector/string. I do not know why need an additional DLL. Any comments?
regards,
George
|
|
|
|
|
George_George wrote: I have not found any formal document mentioning what is the function of msvcp90d.dll
http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx[^]
Multithreaded, dynamic link (import library for MSVCR90.DLL). Be aware that if you use the Standard C++ Library,
your program will need MSVCP90.DLL to run.
led mike
|
|
|
|
|
Hi led mike,
I have read it, and my confusion is in my understanding STL is provided by source form, means the application build code with STL source code directly, I am not sure why we need an additional DLL, msvcp90d.dll?
regards,
George
|
|
|
|
|
George_George wrote: my confusion is in my understanding STL
Your confusion is because you can't READ. Where in that article or the section I posted do you see any reference to STL? WHERE?
LEARN HOW TO READ
led mike
|
|
|
|
|
Hi led mike,
I actually have read the document you referred. But my confusion is, in files such as vector/string, it already contain source codes (so that we can build such source codes directly into our projects) and why additional DLL is needed?
regards,
George
|
|
|
|
|
You didn't answer my last question.
led mike wrote: Where in that article or the section I posted do you see any reference to STL? WHERE?
LEARN HOW TO READ, it will help you, really Really REALLY help you.
led mike
|
|
|
|
|
Hi led mike,
The article indicates STL functinos are exported by msvcp90d.dll and I have actually used dumpbin /exports to experiment with export symbols.
But, why there is also source code? The source code is not built into application? I am confused.
regards,
George
|
|
|
|
|
George_George wrote: The article indicates STL functinos are exported by msvcp90d.dll
Where? Quote it, post the freaking quote that says that.
led mike
|
|
|
|
|
Hi led mike,
1.
Here it is.
"Multithreaded, dynamic link (import library for MSVCP90D.DLL)" under "Standard C++ Library" section. I think Standard C++ Library is STL. And I think the quoted sentence means for STL function it is implemented and exported in DLL msvcp90d.dll. If I am wrong to get the hint from the documents, please feel free to correct me.
2.
Could I ask your option, you think STL function is built in source code form into our application directly, or you think STL function is provided in the form of DLL, which is accessed from import address table?
regards,
George
|
|
|
|
|
George_George wrote: I think Standard C++ Library is STL.
Wrong. STL != "Standard C++ Library".
http://www.cplusplus.com/reference/[^]
Stop making assumptions. Learn how to READ and stop asking so many questions in internet forums. You need to spend more time reading and processing the mountains of information that already exist.
Here's how it works: You discover something that you don't understand about software development. You go to Google type in some relevant key words and start READING the mountains of results. While you READ you think, process and try to understand.
Now for the PRIMARY FACTOR (VERY IMPORTANT)! Many subjects have prerequisites. Therefore the order in which one read things is directly related to ones ability to understand the material. So stop jumping around all over the place. Go back to the beginning and make sure you understand a subject before you move on to another. Get it? Got it? GOOD!
Oh, and have a nice day.
led mike
|
|
|
|
|
Thanks led mike,
I think previous our previous confusion is whether STL is provided in source format? -- which built into (in the form of source codes) client application. Or STL is provided in DLL msvcp90d.dll? What is your conclusion?
regards,
George
|
|
|
|
|
George_George wrote: What is your conclusion?
Wow, really? Well based on this conversation culminating with your last post, my conclusion is that you lack the aptitude required for software engineering. Really, I'm not kidding. You can't read and understand the documentation, that's a pretty important aspect of the field. I suggest you find a different field of study, something more suited to you, maybe you could be a lawyer since you like to talk so much.
led mike
|
|
|
|
|
Hi led mike,
Previously I think STL functions like cout is provided in source form, but through debugging (I attached my output below), which proves cout is provided in binary form (in MSVCP90D.DLL), so here is my confusion. I want to know what is your point whether you think STL is provided in binary form or in source form.
Looks here MSVCP90D!std::basic_ostream<char,std::char_traits<char> >::operator<<: module name is MSVCP90D other than my own exe name.
In binary form means we use import library to link, and actual implementation code is in DLL, source code form means the source code of STL is provided and we integrate (compile) the source code directly into our code.
0:000> t
MSVCP90D!std::basic_ostream<char,std::char_traits<char> >::operator<<:
00000000`104c32d0 4889542410 mov qword ptr [rsp+10h],rdx ss:00000000`0012fe88=cccccccccccccccc
0:000> k
Child-SP RetAddr Call Site
00000000`0012fe78 00000001`400010e6 MSVCP90D!std::basic_ostream<char,std::char_traits<char> >::operator<<
00000000`0012fe80 00000001`400016b2 TestDebug1!main+0x56
00000000`0012fee0 00000001`4000150e TestDebug1!__tmainCRTStartup+0x1920
00000000`0012ff50 00000000`77d5964c TestDebug1!mainCRTStartup+0xe
00000000`0012ff80 00000000`00000000 kernel32!BaseProcessStart+0x29
#include <iostream>
using namespace std;
int foo()
{
int b = 300;
return b;
}
int goo()
{
int a = 400;
return a;
}
int main()
{
int a = 200;
void** b1 = (void**)&a;
void* b2 = *b1;
int b3 = (int)*b1;
cout << (void*)b2 << endl;
cout << (void*)b3 << endl;
return 0;
}
regards,
George
|
|
|
|
|
George_George wrote: Previously I think STL functions like cout
LISTEN UP GEORGE! If you are not going to bother to read the links I provide I will no longer be assisting you. The link I provided clearly shows that cout is part of the Standard C++ Stream Library and NOT PART OF THE STANDARD TEMPLATE LIBRARY!
I have not read the rest of your post, since you don't read mine I have no intention on reading yours.
Oh, and have a nice day.
led mike
|
|
|
|
|
Sorry led mike, I am using the wrong terminology. But we are talking about different things. My question is, for STL function, I am not sure whether it is provided in the form of DLL (which we implicit link with) or provided with source code (which we built into our application directly). Any comments?
regards,
George
|
|
|
|
|
George_George wrote: for STL function, I am not sure whether it is provided in the form of DLL (which we implicit link with) or provided with source code (which we built into our application directly). Any comments?
The Standard C++ library, in VC++, is provided in the form of static .lib or a .DLL/.lib ( and of course header files). The Standard Template Library is supplied in the form of header files. If you read through all the STL header files you will no doubt see them using aspects of the Standard C++ Library thereby making the header files dependent on the Standard C++ Library and the static .lib or .DLL/.lib.
Now the question you should really be asking yourself is, perhaps you lack the requisite aptitude for this field if it takes all the C++ documentation + 7 days of 20 forum messages for you to comprehend this very simple, basic, fundamental fact?
led mike
|
|
|
|
|
Hi led mike,
I found the information in the header file is enough for the implementation, for example, like file vector/string, I am just not sure why supply additional lib/dll, any ideas?
regards,
George
|
|
|
|
|
Hi All,
I want to dowload the files from ftp server.I dont know how to connect to ftp and how to download the files.I need this in C++(not MFC or VC++).pls help me........................
Thanks and regards,
Anitha
|
|
|
|
|
|
|
Hi,
I need ftp connection with command line.plz help me......
Regards,
Anitha
|
|
|
|