From: John L. <jla...@gm...> - 2009-05-11 01:28:46
|
On Sat, May 9, 2009 at 5:46 AM, klaas.holwerda <ng...@kl...> wrote: > Hi, > > When i enable in wxWidgets in config.vc the next: > > # Link with gdiplus.lib? (Needed for wxGraphicsContext, will also set > wxUSE_GRAPHICS_CONTEXT) [0,1] > USE_GDIPLUS = 1 > > this result in linking errors in wxstedit ( and later also in wxLua) and > all other modules i presume. > So i add in the makefile.vc by hand the missing gdiplus.lib. > > I wonder how it would be possible to handle this directly in bakefile > generated makefiles. > For instance, build.cfg, contains the setting for USE_GDIPLUS, so it can > be detected. > I don't see how to automatically test for this, but we could add a condition USE_GDIPLUS as wxWidgets does. Francesco, do you think this would work? ------------------------------------------- Ripped from wxWidget's 2.8.10 config.bkl to be put into wxCode's wx_win32.blk <if cond="FORMAT!='autoconf'"> <option name="USE_GDIPLUS"> <values>0,1</values> <default-value>0</default-value> <description> Link with gdiplus.lib? (Needed for wxGraphicsContext, will also set wxUSE_GRAPHICS_CONTEXT) </description> </option> </if> <if cond="FORMAT_SUPPORTS_CONDITIONS=='0'"> <if cond="FORMAT!='autoconf'"><set var="USE_GDIPLUS">0</set></if> </if> ------------------------------------------- Ripped from wxWidget's 2.8.10 common.bkl to be put into wxCode's wx_win32.blk <if cond="FORMAT!='autoconf'"> <set var="GDIPLUS_LIB"> <if cond="USE_GDIPLUS=='1'">gdiplus</if> </set> </fi> Put this after the line "<sys-lib>odbc32</sys-lib>" in wx.blk <sys-lib>$(GDIPLUS_LIB)</sys-lib> ============================================ So I tried puttting this into wxCode's wx_win32.bkl and the output code looks ok, but it's not tested. The dsp and vcproj are unchanged, but the makefile.vc should work. Index: presets/wx_win32.bkl =================================================================== RCS file: /cvsroot/wxcode/wxCode/build/bakefiles/presets/wx_win32.bkl,v retrieving revision 1.4 diff -b -u -2 -r1.4 wx_win32.bkl --- presets/wx_win32.bkl 13 Feb 2008 14:00:13 -0000 1.4 +++ presets/wx_win32.bkl 11 May 2009 01:27:48 -0000 @@ -35,5 +35,23 @@ <!-- comments for more info. --> + <if cond="FORMAT!='autoconf'"> + <option name="USE_GDIPLUS"> + <values>0,1</values> + <default-value>0</default-value> + <description> + Link with gdiplus.lib? (Needed for wxGraphicsContext, set to the value of wxUSE_GRAPHICS_CONTEXT) + </description> + </option> + </if> + + <if cond="FORMAT_SUPPORTS_CONDITIONS=='0'"> + <if cond="FORMAT!='autoconf'"><set var="USE_GDIPLUS">0</set></if> + </if> + <if cond="FORMAT!='autoconf'"> + <set var="GDIPLUS_LIB"> + <if cond="USE_GDIPLUS=='1'">gdiplus</if> + </set> + </if> <!-- HELPER VARIABLES --> @@ -248,4 +266,5 @@ <sys-lib>wsock32</sys-lib> <sys-lib>odbc32</sys-lib> + <sys-lib>$(GDIPLUS_LIB)</sys-lib> </if> > A second bakefile related problem is that building debug and release of > wxstedit, both result in the same library name: > wcode_msw28_stedit > > But for debug it should generate: > > wcode_msw28d_stedit > I have rebaked the wxstedit build files in CVS and I see that the dsp files put a 'd' in for debug so I assume that the makefile.vc should too. > > Francesco, are you able to fix that? ;-) > > I hope he has time to look at the above. -John |