dynamic library building and loading

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Sep 26 12:25:07 PDT 2012


On 9/26/12 2:59 PM, Michael wrote:
> On Wednesday, 26 September 2012 at 17:57:29 UTC, Andrei
> Alexandrescu wrote:
>> Haven't done any dynamic linking with D and I need to. I'm using dmd
>> 2.058/Linux at work to build and use dynamic libraries. Here's my
>> attempt:
>
> Maybe it will help you
> D:
> https://bitbucket.org/AnyCPU/codewithd/raw/de0a2f0ea1af/symload.d
>
> Fortran:
> https://bitbucket.org/AnyCPU/codewithd/raw/de0a2f0ea1af/simple.f95
>
> Dmd 2.060 used.
>
> DLL on OpenSUSE 64bit compiled with command:
> gfortran -shared -fPIC -O3 -o simple.so simple.f95
>

Thanks. The loading part is very useful, but I'm still lost when it 
comes to build the shared library itself.

Andrei


More information about the Digitalmars-d mailing list