[no subject]

  gcc -c dll.c
  dlltool -e exports.o -l dll.lib dll.o
  gcc dll.o exports.o -o dll.dll
  gcc program.o dll.lib -o program

In the case of Gtk-Perl, the dll is the main Gtk subcomponent (Gtk.dll),
and the executable program is one of the other subcomponents (e.g.

I tried this with Gtk-Perl:

  $ cd Gtk
  $ perl Makefile.PL
  $ make
  $ dlltool --def libGtk.def --output-lib libGtk.dll.a
  $ cd ../GdkImlib
  $ perl Makefile.PL

  ### Now, to link in libGtk.dll.a, add the following
  ### to the GdkImlib Makefile:
    OTHERLDFLAGS = ../Gtk/libGtk.dll.a

  $ make

Now instead of undefined references to basic things like 'newSVMiscRef'
and 'SvMiscRef', I'm getting the following:

    Warning: resolving _pgtk_did_we_init_gtk by linking to
__imp__pgtk_did_we_init_gtk (auto-import)
    fu000001.o(.idata$3+0xc): undefined reference to `libGtk_dll_a_iname'
    nmth000000.o(.idata$4+0x0): undefined reference to
    collect2: ld returned 1 exit status
    dllwrap: gcc exited with status 1

I don't know if these symbols are the only ones which are undefined, or
if they're just the first ones.  Do they look familiar to anyone?

I'm going to have to drop this for a week or two, as I'll be out of town.
If anyone else wants to pick it up, be my guest :)

Apologies for cluttering up the list with compilation issues if it is
not appropriate.


    * How to build Win32 Dynamic-Loading Library (DLL) from existing static

Michael Graham
magog the-wire com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]