Linking order on Linux matters?

Dmitry Olshansky dmitry.olsh at gmail.com
Mon Nov 25 11:13:57 PST 2013


25-Nov-2013 22:19, Jeremy DeHaan пишет:
> Hey all,
>
> New to Linux, so I wanted to double check something. I have a C shared
> library and a D static library. The D static library uses functions from
> the C library. On Windows, it didn't matter what order I linked the
> .libs in and it always compiled fine. On Linux, however, I have to link
> the static library first and then the shared library or else I get
> undefined symbols for each extern(C) function I declare in my D code.
> Is
> this normal for Linux or is it a compiler bug?
>
AFAIK it's was a somewhat (a couple of years?) recent change but yes, 
it's the norm on Linux now.

> Thanks!


-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list