From: Earnie B. <ea...@us...> - 2008-06-12 12:26:50
|
Quoting Brian Dessent <br...@de...>: > Felipe Contreras wrote: > >> Basically I just want to know $subject. >> >> Is there a difference? > > Yes. When you link with a .dll.a file you're using an import library. > When you link directly to a .dll you're not. The difference is that > there are certain features only available by using an import library, as > detailed in the Win32 section of the ld manual. In addition to those > (essentially, you can rename and alias symbols with an import library) > the import library gives a level of indirection similar to the ".so > symlink" in Linux. This is useful for versioned libraries such that > "-lfoo" still works and refers to the import library libfoo.dll.a which > itself internally contains the real name of the DLL that is actually > named libfoo-n.dll or libfoon.dll or libfoo-n.x.y.dll or however the > versioning is desired. > Brian, I disagree slightly. -lfoo will look for foo.dll as well as libfoo.dll.a, foo.lib and libfoo.a and will find them as long as they exist in the library search path; I forget the order of the search. The difference in linking directly to the dll vs the import lib is slight but you may have better results (performance improvements) linking directly to the dll. Earnie |