On 10 October 2012 13:59, Manu <[email protected]> wrote: > On 10 October 2012 15:42, Jacob Carlborg <[email protected]> wrote: >> >> On 2012-10-10 13:15, Iain Buclaw wrote: >> >>> NB: GCC has no such equivalent, and IMO libraries should be specified >>> during the linking step. Such information simply doesn't belong inside >>> a source file as a source file can be compiled or assembled even >>> without a linking stage. >> >> >> I agree, I think a package manager together with a build tool should be >> used instead. > > > None of those things actually embody the information about the relationship, > nor can they. The source code does, and nothing else. Features that imply > the dependency may (and often are) be disabled at compile time. > I rather like that the compiler is able to put a note in the object file > that it depends on a particular lib, because it does. > I'm not sure how a package manager helps... What is a package manager? ;) > I'd like to hear some reasons why that is a bad or undesirable thing, or is > this just an opinion?
IIRC the toolchain used by Visual Studio *always* performs linking, so that is why this is not a problem for MSVC. To embody the information about the relationship in the object file, one must be able to embody the information about the relationship in the assembler file. And last time I checked there is no assembly syntax for '#pragma lib'. Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
