[cairo] Cairo fails to render under Windows/MSVC

Tristam MacDonald swiftcoder at gmail.com
Mon May 31 21:17:50 PDT 2010


On Mon, May 31, 2010 at 12:01 PM, Adrian Lopez
<adrianlopezroche at gmail.com> wrote:
> On Sun, May 30, 2010 at 9:58 AM, Tristam MacDonald <swiftcoder at gmail.com>
> wrote:
>>
>> I think my issue probably has to do with a DLL incompatibility between
>> versions of msvrct.dll, which is mentioned on the GTK site, but not
>> heavily explained. Perhaps my best option is to try and compile pango
>> and cairo myself, using MSVC?
>
> I don't know about that. I've been using Cairo under Visual Studio 2005 and
> Visual Studio 2008 without any problems, though in my case I'm rendering to
> a Win32 surface rather than an image surface. I did get a warning about
> LIBCMT.lib conflicting with other default libraries, but that didn't seem to
> prevent Cairo from working properly. I ultimately disabled the LIBCMT.lib
> via the IDE's "Ignore Specific Library" option (under Properties ->
> Configuration Properties -> Linker -> Input) just to be safe, but I don't
> think that's likely to solve the problem you're having.
>
> I used to have a problem where my program would hang when calling Pango
> functions until I added a call to g_type_init() prior to using Pango. Though
> your program isn't hanging and removing calls to Pango hasn't fixed your
> problem, it might still be a good idea to add a call to g_type_init() as a
> precaution.

To test this I just installed MinGW and compiled the example with
that. The result is the same, i.e. the background color is rendered,
but the stroke, fill and text are not (even without pango, the stroke
and fill are not rendered).

Since the identical example program works perfectly on Linux (Ubuntu
10, stock cairo and pango from apt), I am led to one of two
conclusions:
a) My code is bad, but cairo on linux is more forgiving
b) GTK's binary for cairo is broken

Of the two, the first seems the more likely, but I don't seem to have
a way to verify it. Is anyone else in a position to verify that the
cairo binary offered by the GTK site is in fact working for them?

Just to be crystal clear, I am talking about the binaries from the
'official' GTK site: http://www.gtk.org/download-windows.html

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/


More information about the cairo mailing list