[cairo] Confusion between generated and distributed cairo.def

J. Ali Harlow ali at avrc.city.ac.uk
Thu Aug 25 04:30:11 PDT 2005

On 25/08/05 11:26:48, Tor Lillqvist wrote:
> J. Ali Harlow writes:
>  > I think the best solution is to simply remove the distributed
>  > version and always generate it.
> But this then will cause (a small amount of) extra work for those who
> want to build with MSVC, and need a .def file. Part of the reason to
> have an official cairo.def file in the tarball was so that also
> people who build with MSVC would use exactly the same entries in the  
> DLL, wasn't it?
> (On the other hand a cairo tarball doesn't contain any makefiles for
> MSFT's nmake or any prebuilt config.h for Win32, so people building
> with MSVC have to do some manual work anyway. There is no guarantee
> they will choose to produce a DLL with the same name as the
> libtool+mingw combination does (libcairo-2.dll), either. In fact for
> MSVC users such a DLL name is probably far from what they would
> naturally choose. But that is perhaps not a bad thing, though, if it
> makes the distinction clear between the "official" ABI provided by a
> libcairo-2.dll produced using cairo.def and mingw, and other cairo
> DLLs.)

I don't know. Hans?

I attach a patch which implements my alternative solution. I'm not  
really very happy with it however. It will work for non-developers  
since cairo.def should always be up-to-date in distributions and should  
work for developers that don't use VPATH since $(srcdir) will be "." in  
this case and the rule for cairo.def will be used if the header files  
change (I think), but it will cause a stale cairo.def if a developer is  
using VPATH since the rule for cairo.def won't match $(srcdir)/ 
cairo.def). This sounds like the kind of subtle bug that would be hard  
to track down and thus best avoided.

I'll think more on it and see if I can come up with a better solution  
if the MSVC folks do need cairo.def.


Ali Harlow                              Email: ali at avrc.city.ac.uk
Senior Research Officer                 Tel:   (020) 7040 4348
Applied Vision Research Centre          Intl: +44 20 7040 4348
City University                         Fax:   (020) 7040 5515
London                                  Intl: +44 20 7040 5515

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-1.0.0-def.patch
Type: text/x-patch
Size: 628 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050825/f41e0755/cairo-1.0.0-def-0001.bin

More information about the cairo mailing list