← Back to team overview

kicad-developers team mailing list archive

Re: GDI+ sucks / how to compile under Windows

 

--00032555fdbeeffea1047f6dc9db Content-Type: text/plain; charset=UTF-8

2010/2/12 Wayne Stambaugh <stambaughw@...>

>
>
> Manveru wrote:
> >
> >
> > Hello,
> >
> > Compilation of KiCad from latest revision under Windows is _not
> > straightforward_ anymore. Because there is a strong need for gdi+
> > libraries, this link might be useful:
> >
> >
> http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=
> > <
> http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=
> >
> >
> > This requires to rebuild the wxWidgets 2.9.0 once again this time with
> > wxGraphicsContext, so there might be a problem with gdi+ stuff with
> > wxWidgets.
> >
> > Solution is here:
> >
> http://www.miscdebris.net/blog/2009/09/17/adding-gdi-headers-to-mingw-to-compile-wxwidgets-with-wxgraphicscontext-support/
> >
> >
> > This message is only an informative announcement to anyone interested in
> > mingw build of KiCad under Windows. Hope it helps. Maybe it should go
> > somewhere on the wiki left for further generations (until wxWidgets team
> > drop gdi+).
>
> Manveru,
>
> I added this link to COMPILING.txt on SVN r2323 as well as the
> instructions on building wxWidgets to enable wxGraphicsContext using
> MinGW. Enabling USE_WX_GRAPHICS_CONTEXT on windows doesn't work with
> wxWidgets 2.8.10 either. I builds fine but there is difference between
> the way wxGraphicsContext works on GTK and Windows. It appears that on
> windows, the coordinate transforms are not implemented properly and the
> clip box (wxDC clip box not Kicad's internal clip rectangle) is
> somewhere outside the client area. This results in a rather amusing
> behavior where everything that is inside the client window doesn't get
> repainted. I'm not sure if wxWidgets or GDI+ is to blame. No one ever
> said cross platform software development was easy :)
>
> Wayne
>

Thank you Wayne, you may add a side note, that compilation of wxWidgets with
3.2 < gcc < 4.4.1 (as far as I investigated the problem) may require a
CXXFLAGS=-fpermissive option in make invocation. In other case, there will
be problems with GDI+ headers.

-- 
Manveru
jabber: manveru@...
gg: 1624001
http://www.manveru.pl
 --00032555fdbeeffea1047f6dc9db Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">2010/2/12 Wayne Stambaugh <span dir=3D"l=
tr">&lt;<a href=3D"mailto:stambaughw@...";>stambaughw@...</a=
>&gt;</span><br><blockquote class=3D"gmail_quote" style=3D"border-left: 1px=
solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">













<div style=3D"background-color: rgb(255, 255, 255);">
<span>=C2=A0</span>


<div>
<div>


<div>
=20=20=20=20=20=20
=20=20=20=20=20=20
<p></p><div><div></div><div class=3D"h5">Manveru wrote:<br>
&gt; <br>
&gt; <br>
&gt; Hello,<br>
&gt; <br>
&gt; Compilation of KiCad from latest revision under Windows is _not<br>
&gt; straightforward_ anymore. Because there is a strong need for gdi+<br>
&gt; libraries, this link might be useful:<br>
&gt; <br>
&gt; <a href=3D"http://code.google.com/p/wxmax/downloads/detail?name=3Dgdip=
lus_includes.zip&amp;can=3D2&amp;q=3D" target=3D"_blank">http://code.google=
.com/p/wxmax/downloads/detail?name=3Dgdiplus_includes.zip&amp;can=3D2&amp;q=
=3D</a><br>

&gt; &lt;<a href=3D"http://code.google.com/p/wxmax/downloads/detail?name=3D=
gdiplus_includes.zip&amp;can=3D2&amp;q=3D" target=3D"_blank">http://code.go=
ogle.com/p/wxmax/downloads/detail?name=3Dgdiplus_includes.zip&amp;can=3D2&a=
mp;q=3D</a>&gt;<br>

&gt; <br>
&gt; This requires to rebuild the wxWidgets 2.9.0 once again this time with=
<br>
&gt; wxGraphicsContext, so there might be a problem with gdi+ stuff with<br=
>
&gt; wxWidgets.<br>
&gt; <br>
&gt; Solution is here:<br>
&gt; <a href=3D"http://www.miscdebris.net/blog/2009/09/17/adding-gdi-header=
s-to-mingw-to-compile-wxwidgets-with-wxgraphicscontext-support/" target=3D"=
_blank">http://www.miscdebris.net/blog/2009/09/17/adding-gdi-headers-to-min=
gw-to-compile-wxwidgets-with-wxgraphicscontext-support/</a><br>

&gt; <br>
&gt; <br>
&gt; This message is only an informative announcement to anyone interested =
in<br>
&gt; mingw build of KiCad under Windows. Hope it helps. Maybe it should go<=
br>
&gt; somewhere on the wiki left for further generations (until wxWidgets te=
am<br>
&gt; drop gdi+).<br>
<br></div></div>
Manveru,<br>
<br>
I added this link to COMPILING.txt on SVN r2323 as well as the<br>
instructions on building wxWidgets to enable wxGraphicsContext using<br>
MinGW. Enabling USE_WX_GRAPHICS_CONTEXT on windows doesn&#39;t work with<b=
r>
wxWidgets 2.8.10 either. I builds fine but there is difference between<br>
the way wxGraphicsContext works on GTK and Windows. It appears that on<br>
windows, the coordinate transforms are not implemented properly and the<br>
clip box (wxDC clip box not Kicad&#39;s internal clip rectangle) is<br>
somewhere outside the client area. This results in a rather amusing<br>
behavior where everything that is inside the client window doesn&#39;t get<=
br>
repainted. I&#39;m not sure if wxWidgets or GDI+ is to blame. No one ever=
<br>
said cross platform software development was easy :)<br>
<br>
Wayne<br>
</div></div></div></div>



=20=20






</blockquote></div><br>Thank you Wayne, you may add a side note, that compi=
lation of wxWidgets with 3.2 &lt; gcc &lt; 4.4.1 (as far as I investigated =
the problem) may require a <span style=3D"font-family: courier new,monospac=
e;">CXXFLAGS=3D-fpermissive</span> option in make invocation. In other case=
, there will be problems with GDI+ headers.<br clear=3D"all">
<br>-- <br>Manveru<br>jabber: <a href=3D"mailto:manveru@...";>manveru=
@manveru.pl</a><br> =C2=A0 =C2=A0 gg: 1624001<br> =C2=A0 <a href=3D"http://=
www.manveru.pl">http://www.manveru.pl</a><br>
 --00032555fdbeeffea1047f6dc9db-- 




Follow ups

References