Re: Compilation errors with MSVC after recent changes to 'cairo-path-stroke-traps.c'
Thomas Berg <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CABYiQpkN4WtEhKtMtob5J4Zj2Uy7k1r0OgbHDdJGQ8i1KLyq-Q@mail.gmail.com> |
On Fri, Oct 10, 2014 at 9:37 PM, Chris Wilson <[email protected]> wrote: > > I guess it just wants explicit structure initialisation with each field > or it may not even like the variable length array? e.g. > cairo_point_t t[3] = { {in->x, in->y }, {mid->x, mid->y}, {out->x, > out->y}}; > > It'll take a bit of trial and error to remember what msvc accepts. > -Chris > FWIW, I'm using VS2008 and simply adding lengths to the arrays didn't work. Not sure if it's the most elegant solution, but I got it to compile by replacing these lines: cairo_point_t t[] = { in->point, *inpt, *outpt }; cairo_point_t e[] = { in->cw, in->ccw, out->cw, out->ccw }; with these: cairo_point_t t[3]; cairo_point_t e[4]; t[0] = in->point; t[1] = *inpt; t[2] = *outpt; e[0] = in->cw; e[1] = in->ccw; e[2] = out->cw; e[3] = out->ccw; Cheers, Thomas -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo