   [C++] What are my linker and compiler up to
  Hi all.I recently changed my project from linking against libpng and zlib dynamically via dll, to linking against them statically (so I can use the new versions and so I don't have to distribute the dlls). Two things have happened that weren't happening before: Now my compiler creates a .lib of the name of my executable right before finishing the compilation, and the linker requires compile time across file optimization.So why does my compiler now create an appname.lib before creating my appname.exe? Is this a consequence of the cross file optimization?EDIT: I forgot to say I am using visual c++ 10.   
  If your application contains any definitions that are like __declspec(dllexport) then it'll generate a .lib for your application. I'm not familiar with statically linking the libraries you've mentioned but this probably means that either they aren't meant to be statically linked or you didn't follow the instructions properly when doing so. However, this is generally a benign problem that can be ignored.   ;If your application contains any definitions that are like __declspec(dllexport) then it'll generate a .lib for your application. I'm not familiar with statically linking the libraries you've mentioned but this probably means that either they aren't meant to be statically linked or you didn't follow the instructions properly when doing so. However, this is generally a benign problem that can be ignored.My application doesn't have any __declspec(dllexport) definitions, or anything like that at all. All I did was download libpng 1.5, zlib 1.2.5 and compile those using the release library configuration (which SHOULD compile them for static linking, as this is what it says in the readme) that came with the solution file for both, and then linked those to my program statically. I'm even using the same header files for those libraries as before, so I don't think anything is being defined in that wasn't there to begin with.I know its benign cause everything still works like it always used to, I'd just like to know whats going on anyway.Edit: Here is the exact linker message:[font="Consolas"][size="1"][font="Consolas"][size="1"]libpng.lib(pngread.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance1>Creating library C:\Users\AC\Documents\Visual Studio 2010\Projects\Peaktech\Peaktech\Debug\Peaktech.lib and object C:\Users\AC\Documents\Visual Studio 2010\Projects\Peaktech\Peaktech\Debug\Peaktech.exp[/font][/font]And I can't for the life of me figure out why its doing that last bit there.Edit 2: It looks like whole program optimization has nothing to do with the fact that my program now thinks its a dll, as when I compiled libpng and zlib without it, it STILL creates a .lib and .exp for my application. And I can confirm that if I compile libpng as a dll and then link it, my program no longer generates a .lib and .exp for itself. This probably means I need to tweak something in libpng do make linking against it statically nice and clean but I can't tell what. If anyone who is good with compilers and linkers and stuff likes that could tell me where to begin it would be very nice. Thank you in advance   