[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bacula-devel] patch: use DLL_IMP_EXP for all exported symbols on win32
Le Friday 14 November 2008 17:20:59 Kern Sibbald, vous avez écrit :
> On Thursday 13 November 2008 21:21:50 Eric Bollengier wrote:
> > Hello Ricardo,
> > Don't you think that a simple script can do the work and generate the def
> > file before linking dlls and binaries ?
> > The existing make_def doesn't work well, but with some information about
> > how get the symbol name from the object file, i can do it without
> > changing all the code and puting win32 darkness keywords everywhere...
> I prefer to continue with our manual method rather than modify the code,
> because it looks Windows like, ungly, and will cause problems maintaining
> If we can automate the make_def script so that it really works (I just cut
> and pass the appropriate output into the real .def file) then that would
> even be better.
I think that the dlltool from mingw is there to handle the def file
generation. I will do some research to see how it works.
> > Bye
> > Le Thursday 13 November 2008 21:01:11 rgh, vous avez écrit :
> > > Hello,
> > > bacula uses the DLL_IMP_EXP macro to tag all variables that must be
> > > visible outside bacula.dll
> > > Functions, however, are exported using a .def file, a more cumbersome
> > > method requiring to use mangled names.
> > > Since the def files uses mangled names, every compiler requires a
> > > separate file (64 bit requires a different file, too).
> > > This patch uses the DLL_IMP_EXP macro to export all symbols, removing
> > > the need for a .def file.
> > > Advantages:
> > > - supported by all win32 compilers, including gcc and msvc
> > > - no need to have different configuration files for different compilers
> > > or bit sizes.
> > > - exported symbols are tagged in the .h with an simple and uniform
> > > syntax, easier to use (even for unix developers :)
> > >
> > >
> > > Disadvantages:
> > > - every exported symbol must be decorated by DLL_IMP_EXP, making the
> > > declaration uglier.
> > >
> > > Note:
> > > a subsequent patch will remove the def file of cats.dll
> > >
> > > Riccardo
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Bacula-devel mailing list
This mailing list archive is a service of Copilot Consulting.