7

I noticed while linking to the pcl (point cloud library) that some of the dll stub libs have more than 10MB where the dll themselves have less than half of that size (these are release builds!). Shouldn't the stub lib only contain minimal information so that the dll information is accessible? How can it be larger than the dll files they refer to?

The relevancy for me is that by linking to the big stub libs, my own executables are also greatly growing in size; something I wanted to prevent by using dlls.

Are there settings in VS that change the dll linker behavoiur so that it puts more or less stuff into the stub libs?

Oliver Zendel
  • 2,695
  • 34
  • 29
  • 2
    "Stub libs" is not a common term, do you mean "import libraries"? They are small, much smaller than the DLL. Sounds to me you're actually linking the static libraries. Twice the size of a DLL is about right. Quick way to check is by running dumpbin.exe /imports on your EXE to check that you actually have a dependency on the DLL. – Hans Passant Jan 24 '12 at 10:54
  • Yes, I mean import libraries, sorry (changed header). Most of the time they are indeed small, but not always. Thats exactly why I'm posting this question. Why are some import libs so big? I have build the dlls themeselves and the libs that are generated are definitely only import libs (Linker/Advanced/Import Library with Configuration Type=dll), no static libs. To be sure I checked the output of dumpbin.exe /imports, and it shows the dlls as imports. – Oliver Zendel Jan 24 '12 at 13:13
  • Well, I don't know, can't see it from here. Copy the .lib to a file sharing service so we can have a look at it. – Hans Passant Jan 24 '12 at 13:27
  • Hi, one example are the libs found at http://pointclouds.org/downloads/; prebuilt binaries (Windows) and (at least for me) also those build from source – Oliver Zendel Jan 26 '12 at 18:59
  • No, and I find this behaviour still confusing. – Oliver Zendel Aug 02 '12 at 12:28
  • @OliverZendel Any progeess on your side? Still interested? I downloaded the "big libs" from the link you gave and may try to understand, if I can. – manuell Dec 04 '13 at 17:30
  • @manuell Hi, if you have any insights do post them as an answer to this question. I'm still curious about this. – Oliver Zendel Jan 09 '14 at 16:25
  • @OliverZendel I will maybe take a look this week end (if I find time :-) – manuell Jan 09 '14 at 20:13

0 Answers0