Frontend and backend communication

Dainius (GreatEmerald) pastas4 at gmail.com
Thu Jul 28 12:55:59 PDT 2011


On Thu, Jul 28, 2011 at 10:37 PM, Kai Meyer <kai at unixlords.com> wrote:
> On 07/27/2011 04:40 PM, Dainius (GreatEmerald) wrote:
>
> One reason for the confusing responses is that in your original post you
> said:
> "a frontend (a library)", "a backend (an
> executable)", "Shuffle() is a backend function", and "PlaySound()
> is a frontend one".

D'oh I missed! I did indeed mean the other way round.

But yea, I have already implemented a function table. It seems to be
working relatively fine for now - it compiled, but doesn't want to
link just yet. On Windows, it says that there are undefined symbols,
even though they are quite clearly defined, and then also quite a few
more mangled linker errors; On Linux, my main development platform,
however, I have hit a pretty obvious issue - there is no
libphobos2.so, and I can't link against libphobos2.a because of this:

    ld: /lib64/libphobos2.a(object_.o): relocation R_X86_64_32 against
`.data' can not be used when making a shared object; recompile with
-fPIC

And then there's another problem in that right now the backend is
still written in C and it uses D as a static library, and linking
against that provides a similar error. Of course, since I will have to
rewrite the backend in D to begin with, this might not be such a big
of an issue as the first one.


More information about the Digitalmars-d-learn mailing list