Microsoft Pragma(lib) decls (was RE: [boost] Customer Friendlier Boost Installation)

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Victor A. Wagner Jr. Sent: Wednesday, May 25, 2005 10:34 PM To: boost@lists.boost.org Subject: RE: [boost] Customer Friendlier Boost Installation
At 14:30 2005-05-25, Bennett, Patrick wrote:
[delete] [Bennett, Patrick] Personally, I think the pragma 'link' options are an absolute disaster for large projects.
apparently you've worked with different folks than I. Likely, different kinds of "large projects", too.
It's far, far too easy to end up with lots of libraries getting
in with users having no idea how or why they're being linked against. Since many developers tend to be rather over-eager in #including
[Bennett, Patrick] Well, a single full build is over 55 GB. To me at least, that's large. :) linked headers
(bah, just include it all!)
sounds like "many developers" need to be re-edcuated. or, perhaps, you need better code walkthroughs.
[Bennett, Patrick] Both. :) That doesn't change the fact that having object files which contain special decorations (inserted by a vendor-specific #pragma operation) which cause unspecified libraries to 'automatically' get linked in is a 'bad thing.' For one, there's no official way to dump a list of these explicit link references for any given object file or lib/dll. The only way to (partially) know what might get linked in ahead of time is to go through a dedicated preprocessor step to verify what's being linked. Of course, this just handles the case where the public (interface) headers of all libraries referenced contain pragma/lib entries. It doesn't account for the libraries which defined pragma/lib entries for other libraries within their implementation headers [so the pragma node is only in the linkable file for that static lib or dll's import lib]. Thus, there's no way to 'know' up-front, and in an easy/fast manner, what libraries will actually be linked in when building a dll or exe in the presence of these lib pragma's. They're bad, bad, bad. Vendors like Microsoft are certainly welcome to support them, but adding something like this to the 'standard' would be unacceptable (to me at least ;>). If tool authors want to provide support for Microsoft's extension, that's fine too - it should just always be optional. When it comes to compiling and linking, I don't want the compiler or linker including anything more than I explicitly told it to include. If you disagree, well, hey, I guess we'll just have to agree to disagree. Cheers... Patrick Bennett

I have found it convenient that Boost uses pragmas to link with its libraries, because it would otherwise be a matter of trial and error to determine which of the multitude of libraries created by a default bjam build is the one I need. As it is, I only have to search for the ones the linker can't find, and add their paths to Visual Studio. If you want to suppress that feature, simply use the /NODEFAULT linker option. Keith MacDonald "Bennett, Patrick" <Patrick.Bennett@inin.com> wrote in message news:260A0A30F9017945932CC4F7B911B33901786BF5@i3mail1.i3domain.inin.com...
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Victor A. Wagner Jr. Sent: Wednesday, May 25, 2005 10:34 PM To: boost@lists.boost.org Subject: RE: [boost] Customer Friendlier Boost Installation
When it comes to compiling and linking, I don't want the compiler or linker including anything more than I explicitly told it to include.
If you disagree, well, hey, I guess we'll just have to agree to disagree.
Cheers... Patrick Bennett
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Bennett, Patrick
-
Keith MacDonald