Re: [AD] question about dll linking...

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri, Apr 20, 2001 at 08:25:22PM +0200, Henrik Stokseth wrote:
> hi! sat in front of my computer yesterday and tried to edit the mingw32 makefile so that it shouldn't need an export definition file. however when linking to the allegro dll, i get the following error messages:

Are you sure it's OK to do this?  I think part of the point of
the export definition files is to ensure that the symbol indices
are always the same, whichever compiler built the DLL.  That's
ensured because it is generated at zipup time, so everyone
installing a released version of Allegro gets the same ID
numbers for the symbols.

> ... which makes sense to me since the demo tries to initialize a pointer to a dynamically loaded function compile-time. but why does the dll created with dllwrap and an export definition file just work??? does dllwrap automatically create wrapper functions for all exported functions or what? i didn't find anything in the mingw docs and i have tried to ask the same question on the mingw mailinglist but all i got was lame answers. i could of course rewrite the code to init the table run-time, but there are many programs out there which will be affected if i just apply my patch.

I think normally it's not a problem because the pointers
actually point to static functions in the import library, which
themselves contain jumps to the dynamically loaded functions in
the DLL.

George

-- 
Random project update:
06/03/2001: AllegroGL 0.0.10 released at http://allegrogl.sourceforge.net/
	Six months' worth of changes, including Mingw32 support!



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/