www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Why does using zlib without pragma(lib, ...) work?

reply tipdbmp <email example.com> writes:
The following compiles without pragma(lib, ...):

extern(C) {
     const(char)* zlibVersion();
}

void main() {
     const(char)* sz = zlibVersion();
}
Jun 07 2018
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 07/06/2018 11:47 PM, tipdbmp wrote:
 The following compiles without pragma(lib, ...):
 
 extern(C) {
      const(char)* zlibVersion();
 }
 
 void main() {
      const(char)* sz = zlibVersion();
 }
It has already been compiled in as part of Phobos.
Jun 07 2018
parent reply tipdbmp <email example.com> writes:
What other libraries (if any) are part of Phobos?
Jun 07 2018
parent rikki cattermole <rikki cattermole.co.nz> writes:
On 08/06/2018 12:25 AM, tipdbmp wrote:
 What other libraries (if any) are part of Phobos?
 
That is pretty much it.
Jun 07 2018