<p dir="ltr">On 24 Apr 2015 22:55, "Steven Schveighoffer via Digitalmars-d" <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br>
><br>
> On 4/24/15 4:36 PM, Dicebot wrote:<br>
>><br>
>> On Friday, 24 April 2015 at 20:27:28 UTC, Steven Schveighoffer wrote:<br>
>>><br>
>>> If pragma(lib, "libcurl"); doesn't work normally, then we should<br>
>>> remove std.net.curl, and put it in dub.<br>
>><br>
>><br>
>> It was a historical mistake, discussed many time over and over. Yes, it<br>
>> shouldn't be in Phobos. No, we can't remove it now that easily.<br>
><br>
><br>
> deprecated("Please use dub for curl");<br>
> module std.net.curl<br>
><br>
> // this will cause an error until you install the binding, then you can<br>
> // go through your imports and update them.<br>
> public import some.dub.project;<br>
><br>
><br>
>> As for pragma(lib) - it can never work "normally". Linking 3d-party<br>
>> libraries is very platform-specific task that causes great deal of<br>
>> complexity in build systems. It can't be replaced by a single trivial<br>
>> compiler pragma. There is a reason nothing but Windows build of DMD<br>
>> supports it.<br>
><br>
><br>
> You are right about not having pragma(lib anywhere but windows, but we do depend on 3rd party libs -- libc, libm, librt, etc. They are just always in the right places.<br>
></p>
<p dir="ltr">Doesn't DMD use dmd.conf for these?  Libc may be called something else, libm may or may not be part of libc, and librt may not exist at all.</p>
<p dir="ltr">For the first two, the system C compiler will know this information and implicitly link when you run 'cc mydprog.o -lphobos2'.  For librt, it's less likely so you'll need '-L-lrt' in your D environment vars.</p>