makefile and dll - Mozilla

This is a discussion on makefile and dll - Mozilla ; Hi, I'm writing a firefox extension that have to use a third party dll. I'm writing that extension using facilities offered by the mozilla firefox tree (ie Makefile architecture), What does look like a Makefile using an external dll, in ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: makefile and dll

  1. makefile and dll

    Hi,

    I'm writing a firefox extension that have to use a third party
    dll. I'm writing that extension using facilities offered by the
    mozilla firefox tree (ie Makefile architecture),

    What does look like a Makefile using an external dll, in the
    mozilla-firefox way? Could you please point me to an existing example?

    Thanks for your reply.
    -AJ

  2. Re: makefile and dll

    Antoine Junod wrote:
    > Hi,
    >
    > I'm writing a firefox extension that have to use a third party
    > dll. I'm writing that extension using facilities offered by the
    > mozilla firefox tree (ie Makefile architecture),
    >
    > What does look like a Makefile using an external dll, in the
    > mozilla-firefox way? Could you please point me to an existing example?


    I have used NSPR for accessing external library instead of linking with
    it. In that case nothing additional is needed for Makefile, as extension
    (written in C++) loads library using PR_LoadLibrary and gets addresses
    of symbols inside library with PR_FindSymbol.

    Of course one could also add stuff to LDFLAGS like for example done in
    mozilla/extensions/spellcheck/src/Makefile.in, but I have not tried that
    way as I only need a not very large number of functions from 2 libraries
    (not at the same time) written in C.



  3. Re: makefile and dll

    Antoine Junod wrote:
    > Hi,
    >
    > I'm writing a firefox extension that have to use a third party
    > dll. I'm writing that extension using facilities offered by the
    > mozilla firefox tree (ie Makefile architecture),
    >
    > What does look like a Makefile using an external dll, in the
    > mozilla-firefox way? Could you please point me to an existing example?
    >
    > Thanks for your reply.
    > -AJ


    It will look like
    http://developer.mozilla.org/en/docs...ion_Components
    of course Yes, you will need the stub loader because Firefox itself
    isn't smart enough to try to load the third-party DLL for you.

    HTH,

    --
    Mook
    mook dot moz plus stuff at gmail and stuff

  4. Re: makefile and dll

    Mook writes:

    > Antoine Junod wrote:
    >
    > > Hi,
    > >
    > > I'm writing a firefox extension that have to use a third party
    > > dll. I'm writing that extension using facilities offered by the
    > > mozilla firefox tree (ie Makefile architecture), What does look
    > > like a Makefile using an external dll, in the mozilla-firefox way?
    > > Could you please point me to an existing example?

    >
    > It will look like
    > http://developer.mozilla.org/en/docs...ion_Components
    > of course Yes, you will need the stub loader because Firefox
    > itself isn't smart enough to try to load the third-party DLL for
    > you.


    Okay, that's what I'm using now. But it has a few drawbacks for me
    (certainly wrong things I'm doing . It works (ie load the external
    libraries) only after a re-compilation. It's also a bit annoying to
    package (will I need two packages, one for the extension itself and
    one for the 'dll loader'?

    The best thing for me would be to implement the 'library loader' into
    my extension itself, into the module of my component. I'm actually
    using the NS_IMPL_NSGETMODULE facility. In what is it expending? How
    to merge that call to the lib loader?

    Thanks a lot for your reply,
    A+
    -AJ

+ Reply to Thread