www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Is pragma pragmatic?

Greetings and salutations!

Don't pay attention to the subject.  It's a simple way of saying that I am going
to ask about pragmas. :-)

in the .117 version, the following statement is found on the pragmas
documentation:

|lib 
|Inserts a directive in the object file to link in the library specified by the
|AssignExpression. The AssignExpressions must be a string literal: 
|	pragma(lib, "foo.lib");

I added

pragma(lib,"ws2_32.lib");

to a program and I still need to link the library with the compiler or with
build. ie,

build prog.d ws2_32.lib

or

dmd prog.d ws2_32.lib

Will anyone explain why I still need to do that?

thanks.

jic
Mar 12 2005