kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #04223
Re: GDI+ sucks / how to compile under Windows
--00032555fdbee3af43047f7031ee Content-Type: text/plain; charset=UTF-8
2010/2/12 Wayne Stambaugh <stambaughw@...>
>
>
> [...]
> > >
> > > 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=
> >
> > >
> > <
> 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.
>
> I didn't have any problems building with GCC 3.4.5 on MinGW. I haven't
> had the time to give GCC 4.4.x a try on MinGW. I have my hands full
> with getting USE_WX_ZOOM fixed.
>
> Wayne
>
So it seems something between 3.4.5 and 4.4.1 may have problems with
following constructs:
struct classsomething {
int classsomething::method(int a) {
return 0;
}
}
This is not legal from C++ standard perspective but present in many project
and C++ code and was not problematic till some late gcc 3 and early gcc 4 -
according to some bugtraqs it is fixed somewhere on 4.4 branch... (I do not
have citations noted).
In regard to first part of the subject - I have KiCad compiled on my laptop
(Core2Duo T7100 1.8 GHz with nVidia Quadro NVS 140M) and... pcbnew is very
veery veeery slow... and unresponsive to events until everything is drawn
on screen (sometime three times is redrawn after focus back to pcbnew
window). Instead of some antialiasing I perceive quality of the image as
poorer than previously. If I understand correctly, decision about moving
KiCad to wxGraphicsContext may make KiCad unusable under Windows until new
backed will be developed by wxDevelopers.
So from my perspective it would be better to invest for some OpenGL
acceleration of 2D instead of wxGraphicsContext, but that is my private
opinion.
--
Manveru
jabber: manveru@...
gg: 1624001
http://www.manveru.pl
--00032555fdbee3af43047f7031ee 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"><<a href=3D"mailto:stambaughw@...">stambaughw@...</a=
>></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>[...]<br><div><div class=3D"h5">
> ><br>
> > Compilation of KiCad from latest revision under Windows is _n=
ot<br>
> > straightforward_ anymore. Because there is a strong need for =
gdi+<br>
> > libraries, this link might be useful:<br>
> ><br>
> ><br>
> <a href=3D"http://code.google.com/p/wxmax/downloads/detail?name=3D=
gdiplus_includes.zip&can=3D2&q=3D" target=3D"_blank">http://code.go=
ogle.com/p/wxmax/downloads/detail?name=3Dgdiplus_includes.zip&can=3D2&a=
mp;q=3D</a><br>
> <<a href=3D"http://code.google.com/p/wxmax/downloads/detail?nam=
e=3Dgdiplus_includes.zip&can=3D2&q=3D" target=3D"_blank">http://cod=
e.google.com/p/wxmax/downloads/detail?name=3Dgdiplus_includes.zip&can=
=3D2&q=3D</a>><br>
> ><br>
> <<a href=3D"http://code.google.com/p/wxmax/downloads/detail?nam=
e=3Dgdiplus_includes.zip&can=3D2&q=3D" target=3D"_blank">http://cod=
e.google.com/p/wxmax/downloads/detail?name=3Dgdiplus_includes.zip&can=
=3D2&q=3D</a><br>
> <<a href=3D"http://code.google.com/p/wxmax/downloads/detail?nam=
e=3Dgdiplus_includes.zip&can=3D2&q=3D" target=3D"_blank">http://cod=
e.google.com/p/wxmax/downloads/detail?name=3Dgdiplus_includes.zip&can=
=3D2&q=3D</a>>><br>
> ><br>
> > This requires to rebuild the wxWidgets 2.9.0 once again this =
time with<br>
> > wxGraphicsContext, so there might be a problem with gdi+ stuf=
f with<br>
> > wxWidgets.<br>
> ><br>
> > Solution is here:<br>
> ><br>
> <a href=3D"http://www.miscdebris.net/blog/2009/09/17/adding-gdi-he=
aders-to-mingw-to-compile-wxwidgets-with-wxgraphicscontext-support/" target=
=3D"_blank">http://www.miscdebris.net/blog/2009/09/17/adding-gdi-headers-to=
-mingw-to-compile-wxwidgets-with-wxgraphicscontext-support/</a><br>
> ><br>
> ><br>
> > This message is only an informative announcement to anyone<br=
>
> interested in<br>
> > mingw build of KiCad under Windows. Hope it helps. Maybe it s=
hould go<br>
> > somewhere on the wiki left for further generations (until<br>
> wxWidgets team<br>
> > drop gdi+).<br>
> <br>
> 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 usi=
ng<br>
> MinGW. Enabling USE_WX_GRAPHICS_CONTEXT on windows doesn't wor=
k with<br>
> wxWidgets 2.8.10 either. I builds fine but there is difference bet=
ween<br>
> the way wxGraphicsContext works on GTK and Windows. It appears tha=
t on<br>
> windows, the coordinate transforms are not implemented properly an=
d the<br>
> clip box (wxDC clip box not Kicad's internal clip rectangle) i=
s<br>
> somewhere outside the client area. This results in a rather amusin=
g<br>
> behavior where everything that is inside the client window doesn&#=
39;t get<br>
> repainted. I'm not sure if wxWidgets or GDI+ is to blame. No o=
ne ever<br>
> said cross platform software development was easy :)<br>
> <br>
> Wayne<br>
> <br>
> <br>
> Thank you Wayne, you may add a side note, that compilation of wxWidget=
s<br>
> with 3.2 < gcc < 4.4.1 (as far as I investigated the problem) ma=
y<br>
> require a CXXFLAGS=3D-fpermissive option in make invocation. In other<=
br>
> case, there will be problems with GDI+ headers.<br>
<br></div></div>
I didn't have any problems building with GCC 3.4.5 on MinGW. I haven&#=
39;t<br>
had the time to give GCC 4.4.x a try on MinGW. I have my hands full<br>
with getting USE_WX_ZOOM fixed.<br>
<br>
Wayne</div></div></div></div>
=20=20
</blockquote></div><br>So it seems something between 3.4.5 and 4.4.1 may ha=
ve problems with following constructs:<br><br><span style=3D"font-family: c=
ourier new,monospace;">struct classsomething {</span><br style=3D"font-fami=
ly: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=C2=A0=C2=A0=C2=A0 int =
classsomething::method(int a) {</span><br style=3D"font-family: courier new=
,monospace;"><span style=3D"font-family: courier new,monospace;">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0;</span><br style=3D"font-family:=
courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">=C2=A0=C2=A0=C2=A0 }</s=
pan><br style=3D"font-family: courier new,monospace;"><span style=3D"font-f=
amily: courier new,monospace;">}</span><br><br clear=3D"all">This is not le=
gal from C++ standard perspective but present in many project and C++ code =
and was not problematic till some late gcc 3 and early gcc 4 - according to=
some bugtraqs it is fixed somewhere on 4.4 branch... (I do not have citati=
ons noted).<br>
<br>In regard to first part of the subject - I have KiCad compiled on my la=
ptop (Core2Duo T7100 1.8 GHz with nVidia Quadro NVS 140M) and... pcbnew is =
very veery veeery slow...=C2=A0 and unresponsive to events until everything=
is drawn on screen (sometime three times is redrawn after focus back to pc=
bnew window). Instead of some antialiasing I perceive quality of the image =
as poorer than previously. If I understand correctly, decision about moving=
KiCad to wxGraphicsContext may make KiCad unusable under Windows until new=
backed will be developed by wxDevelopers.<br>
<br>So from my perspective it would be better to invest for some OpenGL acc=
eleration of 2D instead of wxGraphicsContext, but that is my private opinio=
n.<br>-- <br>Manveru<br>jabber: <a href=3D"mailto:manveru@...">manve=
ru@...</a><br>
=C2=A0 =C2=A0 gg: 1624001<br> =C2=A0 <a href=3D"http://www.manveru.pl">htt=
p://www.manveru.pl</a><br>
--00032555fdbee3af43047f7031ee--
Follow ups
References