#pragma comment (lib, ...)

Manu turkeyman at gmail.com
Wed Oct 10 08:53:54 PDT 2012

On 10 October 2012 16:45, Paulo Pinto <pjmlp at progtools.org> wrote:

> This only works if it is part of the language definition.
> In C and C++ case I am usually against it, because I favour portability
> over dependencies to a specific compiler vendor. Many years of writing
> multi-platform code do leave some scars.

Errr, what? This enhanced portability, that's the point.
I've spent my career writing more cross-platform code than most coders
would touch in their lives, and I give thanks for the platforms where it is
It always leads to a vastly simplified path in the build scripts for those
platforms that support it, and typically produces more reliable and
less fickle results; ie, I never experience link problems with those

Multi-platform code always has #ifdef guards around #pragma
comment(lib,)-ing the appropriate libs for the platform which the code is
being built for, and that is the whole point. The code its self selects the
libs it depends on by simply being compiled.

As for D, if this can be made part of the language then I see no big reason
> against it.

Well, DMD says it is ;) .. Question is, is it technically possible for
other compilers to support it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121010/aeb2100b/attachment.html>

More information about the Digitalmars-d mailing list