Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Problem when closing Code::Blocks - 100% CPU Load

<< < (2/2)

Der Meister:
OK, now it gets really weird. With revision 1611 wxPropertyGrid moved to the sdk and wxSmith uses this one and not its own version. First, there are a few patches necessary to build revision 1612 with the Linux build system:

--- Code: ---$ svn diff src/plugins/contrib/wxSmith/
Index: src/plugins/contrib/wxSmith/defwidgets/Makefile.am
===================================================================
--- src/plugins/contrib/wxSmith/defwidgets/Makefile.am  (revision 1612)
+++ src/plugins/contrib/wxSmith/defwidgets/Makefile.am  (working copy)
@@ -1,7 +1,7 @@
 INCLUDES = $(WX_CXXFLAGS) \
                -I$(top_srcdir)/src/sdk \
                -I$(top_srcdir)/src/sdk/wxscintilla/include \
-               -I$(top_srcdir)/src/plugins/contrib/wxSmith/propgrid/include
+               -I$(top_srcdir)/src/sdk/propgrid/include
 
 noinst_LTLIBRARIES = libwxsmith_defwidgets.la
 
Index: src/plugins/contrib/wxSmith/properties/Makefile.am
===================================================================
--- src/plugins/contrib/wxSmith/properties/Makefile.am  (revision 1612)
+++ src/plugins/contrib/wxSmith/properties/Makefile.am  (working copy)
@@ -1,7 +1,7 @@
 INCLUDES = $(WX_CXXFLAGS) \
                -I$(top_srcdir)/src/sdk \
                -I$(top_srcdir)/src/sdk/wxscintilla/include \
-               -I$(top_srcdir)/src/plugins/contrib/wxSmith/propgrid/include
+               -I$(top_srcdir)/src/sdk/propgrid/include
 
 noinst_LTLIBRARIES = libwxsmith_properties.la
 
Index: src/plugins/contrib/wxSmith/resources/Makefile.am
===================================================================
--- src/plugins/contrib/wxSmith/resources/Makefile.am   (revision 1612)
+++ src/plugins/contrib/wxSmith/resources/Makefile.am   (working copy)
@@ -1,7 +1,7 @@
 INCLUDES = $(WX_CXXFLAGS) \
                -I$(top_srcdir)/src/sdk \
                -I$(top_srcdir)/src/sdk/wxscintilla/include \
-               -I$(top_srcdir)/src/plugins/contrib/wxSmith/propgrid/include
+               -I$(top_srcdir)/src/sdk/propgrid/include
 
 noinst_LTLIBRARIES = libwxsmith_resources.la

--- End code ---
With these patches everything compiles without problems. But the two problems I described in my first post came back again.  :?
Has anyone an idea what the reason for this is?

Edit:
OK, I have an explanation for this: Although the source-code is there only once now the wxPropGrid-lib is still linked twice. That is the real problem. I removed the library from the sdk (not the source but the commands for the linker to include it in libcodeblocks) and it works just perfect.
As long as wxPropertyGrid is only used by wxSmith this is no problem but as soon as the core-part uses it we have to link it to the sdk which will make this problems appear again. Thus it sould only be linked to the sdk and *not* to wxSmith - but is this possible? Maybe wxSmith should link to the sdk instead to wxPropertyGrid? Could this work?

Edit2: I just tested it and it seems to work. This patch makes wxSmith link against the sdk (which includes wxPropertyGrid) and not to wxPropertyGrid directly:

--- Code: ---$ svn diff src/plugins/contrib/wxSmith/Makefile.am
Index: src/plugins/contrib/wxSmith/Makefile.am
===================================================================
--- src/plugins/contrib/wxSmith/Makefile.am     (revision 1612)
+++ src/plugins/contrib/wxSmith/Makefile.am     (working copy)
@@ -19,7 +19,7 @@
 
 libwxsmith_la_LIBADD = ../../../sdk/libcodeblocks.la \
                                ../../../sdk/wxscintilla/libwxscintilla.la \
-                               ../../../sdk/propgrid/libpropgrid.la \
+                               ../../../sdk/.libs/libcodeblocks.la \
                                defwidgets/libwxsmith_defwidgets.la \
                                properties/libwxsmith_properties.la \
                                resources/libwxsmith_resources.la

--- End code ---

grv575:
Well if propgrid lib is in the sdk then:

../../../sdk/libcodeblocks.la \                       <-----------
../../../sdk/wxscintilla/libwxscintilla.la \
../../../sdk/propgrid/libpropgrid.la \              <----------

it already is linking against it twice...so just take out the libpropgrid.la link from wxsmith.

Der Meister:
That is exactly what I recommended in my last post and mandrav applied this patch already in revision 1613.  8)

Navigation

[0] Message Index

[*] Previous page

Go to full version