-L-ldl needed on Linux
Unknown W. Brackets
unknown at simplemachines.org
Sat Apr 12 13:20:59 PDT 2008
Yes, I'd think it's Derelict's fault personally. On Windows,
LoadLibraryA is (as far as I know) in the same library as a bunch of
other things you're going to need.
On Linux, it's separated into its own thing. It's potentially possible
you might want to write a Linux executable that does not require libdl,
specifically for a system which might not have it.
That said, it seems fairly unlikely. Surely you can change the dmd.conf
file to automatically pass -L-ldl to dmd, solving your problem?
-[Unknown]
Bill Baxter wrote:
> Unknown W. Brackets wrote:
>> Isn't this what the "lib" pragma is for, if you don't want to have to
>> pass it?
>
> I suppose so (or "link" pragma using dsss/bud). So you're saying it
> could be considered "Derelict's fault" for not providing that pragma.
>
> On Windows, the equivalent libs (containing
> LoadLibraryA/FreeLibrary/GetProcAddress) seem to be linked by default,
> by someone in the toolchain. DMD or DSSS, I'm not sure which.
>
> So it seems reasonable that it should be there by default under Linux, too.
>
>
>> -[Unknown]
>>
>>
>> Bill Baxter wrote:
>>> Just wondering why I have to give dsss the -L-ldl flag manually when
>>> I compile a Derelict-using program under Linux.
>>>
>>> Seems like it shouldn't be neecessary for me to have to specify that.
>>> But who's to blame?
>>> * Is it DMD's fault for not including in the default link libs?
>>> * Is it DSSS's fault for not picking up that it's needed (or for not
>>> puttin it in the default list of flags?)
>>> * Is it Derelict's fault for somehow not telling DSSS that it wants
>>> to use libdl on Linux?
>>>
>>> Any of those seem possible. So anyone know the answer?
>>>
>>> Or is it just my fault for thinking I shouldn't have to stick a
>>> version(linux) block in my dsss.conf file?
>>>
>>> --bb
More information about the Digitalmars-d-learn
mailing list