Re: dllobject/libobject

"Lars Ivar Igesund" <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <074c01c377f0$01423b40$0200000a@mesmer>
----- Original Message ----- 
From: "Bram Moolenaar" <[email protected]>

> > I have figured it out now. I specified
> > compile_dmd object,dllobject,libobject d
> > in the dmd tool file.
>
> I suppose you mean that you now added an action for "compile_dmd" and
> that made it work.

Essentially, yes.

>
> > In the case where these objects would need to
> > be compiled in different ways or at least with different flags, would
> > I then need to define D_COMPILE_ACTION,
> > D_DLL_COMPILE_ACTION, etc?
>
> For your own work this would not be needed.  But if this module is added
> to the Aap distribution it becomes relevant.

I would like this, and the D community too, I suppose. I will turn it over
when I don't see any more immediate improvements and I have
documented what I feel need documenting.

>
> > Also, another problem, dmd don't get the sob DLLOBJSUF, it need
> > .obj. How/where should this be set up?
>
> Do you mean that using ".sob" does not work?  This is a fake suffix,
> used to separate the object compiled for use in a dll from the same file
> compiled for linking in a program.  What is the error you get when using
> ".sob"?

The dmd compiler complains.

>
> Anyway, if your module for using the "d" language now works, I would be
> interested in seeing it.  I intend to write a chapter in the
> documentation about adding a new language (possibly together with
> Adriaan, who is working on :import).  It would be good if we can use a
> real-life example.
>
>
> > A child recipe problem I forgot to mention in my last mail; If the
objects
> > are kept in a subdir and pointed to through :child, there aren't created
> > any dependency log in the subdirs.
>
> Do you mean the "file.c.aap" file that contains the automatically
> generated dependencies?

Hmm, I know what I meant, but I'm not able to reproduce completely
with a minimal example.

I have tried to make a good minimal example to test this stuff, but I think
that something don't work somewhere, quite possible in my recipes.

The 'project' have this structure:

main.aap
bar.d
/foodir
    main.aap
    subbar.d

/foodir/main.aap looks like this:

Source = subbar.d
_top.subbar_obj = `src2obj(Source)`
all: $_top.subbar_obj

In the first test, main.aap looked like this:

:child foodir/main.aap
:program foo : bar.d
                       foodir/$*subbar_obj

Running aap, gave the log attached as 'log1'

Then I removed the created object files and changed main.aap:

:child foodir/main.aap
:dll foo :   bar.d
               foodir/$*subbar_obj

Running aap now, gave the log attached as 'dlllog'

Lars Ivar Igesund
log1 (application/octet-stream, 1.8 KB) - not displayed
dlllog (application/octet-stream, 555 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.