[cairo] Buidling cairomm with MSVC

John Emmas johne53 at tiscali.co.uk
Mon Nov 11 02:46:11 PST 2013


On 11/11/2013 10:04, Andrea Canciani wrote:
>
> See http://msdn.microsoft.com/en-us/library/aa271769(v=vs.60).aspx 
> <http://msdn.microsoft.com/en-us/library/aa271769%28v=vs.60%29.aspx>
> __declspec(import) is mandatory for variables, but for functions it is 
> just an optimization which removes a jump.
>

Thanks for the prompt reply Andrea.  As it happens, that's exactly what 
I wanted to check.  I just encountered a problem with some other library 
which wasn't using __declspec.  Whilst tracking it down I discovered 
that function calls were working as expected - but any attempt to access 
data (from outside the DLL) would crash my program.  My initial 
assumption was that the data wasn't getting initialized for some reason 
but after reading that article I now realise that it was a problem with 
the level of indirection.

Anyway, to cut a long story short...  this caused me to investigate some 
of my other libraries which have historically avoided __declspec 
(including cairomm).  I noticed that some of them (e.g. atk) have 
recently introduced it specifically for variables (ATK_VAR) whereas 
others (e.g. proxy-libintl) use the "DATA" specifier in their module 
definition file.  But cairomm doesn't do either and I just wanted to 
check that you're aware of this issue (which you obviously are!)

So I'm concluding that cairomm doesn't export any variables - yes?

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20131111/a0cb3b4a/attachment.html>


More information about the cairo mailing list