#pragma comment (lib, ...)

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Oct 10 11:54:20 PDT 2012


On Wed, Oct 10, 2012 at 08:56:49AM -0700, Walter Bright wrote:
> On 10/10/2012 8:19 AM, Simen Kjaeraas wrote:
> >On 2012-10-10, 16:19, Walter Bright wrote:
> >>Some object module formats do not have the ability to embed a library
> >>reference in them. Elf (cough cough), Mach-O (wheeze)
> >
> >ELF has .comment and .note sections. While they're not exactly intended
> >for the purpose, they seem to fit the bill?
> >
> >It'd of course require a linker to know what to do with the data, but
> >it seems to me this would not interfere with other uses.
> 
> Exactly. Embedding it in a comment section accomplishes exactly
> nothing if the linker ignores it.
[...]

I thought the point was that linkers that *did* understand it will do
the right thing, and linkers that don't will fall back to the
traditional way (require specifying libraries on the command-line).


T

-- 
The most powerful one-line C program: #include "/dev/tty" -- IOCCC


More information about the Digitalmars-d mailing list