Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Build C::B against wx3.02 with gcc 5.2 under Windows
stahta01:
Do you have issue with CB locking up when you run ProjectOptionsManipulator wx3.0 compiled with gcc 5.2 under windows?
I am testing a modified version of SVN rev 10515 and once I try to bring up the ProjectOptionsManipulator CB stops responding.
wxWidgets 3.02
Windows 7 64 bit
MSys2 MinGW64 GCC 5.2 64 bit
Edit: I am going to try upgrading to a newer SVN rev to see if that fixes the problem.
Tim S.
ollydbg:
--- Quote from: stahta01 on October 05, 2015, 02:01:06 am ---Do you have issue with CB locking up when you run ProjectOptionsManipulator wx3.0 compiled with gcc 5.2 under windows?
I am testing a modified version of SVN rev 10515 and once I try to bring up the ProjectOptionsManipulator CB stops responding.
wxWidgets 3.02
Windows 7 64 bit
MSys2 MinGW64 GCC 5.2 64 bit
Edit: I am going to try upgrading to a newer SVN rev to see if that fixes the problem.
Tim S.
--- End quote ---
I just build this plugin, and I can enable or disable this plugin in C::B's plugin manager, no crash here. I'm also using rev10515, wxWidgts and C::B are all build with "-O0".
EDIT: I can use this plugin to search something in a C::B project, works fine here. :)
EDIT2 I get wired compiler warnings which point to a "}" in the cpp file:
--- Code: ----------------- Build: default in ProjectOptionsManipulator wx3.0.x (compiler: GNU GCC Compiler)---------------
[ 25.0%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DwxUSE_UNICODE -I..\..\..\include -I..\..\..\sdk\wxscintilla\include -ID:\wx3\include -ID:\wx3\lib\gcc_dll\mswud -c ProjectOptionsManipulator.cpp -o ..\..\..\.objs30\plugins\contrib\ProjectOptionsManipulator\ProjectOptionsManipulator.o
ProjectOptionsManipulator.cpp:1178:1: warning: 'virtual bool wxEvtHandler::TryValidator(wxEvent&)' is deprecated [-Wdeprecated-declarations]
}
^
In file included from D:\wx3\include/wx/string.h:24:0,
from ProjectOptionsManipulator.h:9,
from ProjectOptionsManipulator.cpp:10:
D:\wx3\include/wx/event.h:3683:22: note: declared here
virtual bool TryValidator(wxEvent& WXUNUSED(event)), return false; )
^
D:\wx3\include/wx/defs.h:641:43: note: in definition of macro 'wxDEPRECATED'
#define wxDEPRECATED(x) wxDEPRECATED_DECL x
^
D:\wx3\include/wx/event.h:3682:5: note: in expansion of macro 'wxDEPRECATED_BUT_USED_INTERNALLY_INLINE'
wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(
^
ProjectOptionsManipulator.cpp:1178:1: warning: 'virtual bool wxEvtHandler::TryParent(wxEvent&)' is deprecated [-Wdeprecated-declarations]
}
^
In file included from D:\wx3\include/wx/string.h:24:0,
from ProjectOptionsManipulator.h:9,
from ProjectOptionsManipulator.cpp:10:
D:\wx3\include/wx/event.h:3686:22: note: declared here
virtual bool TryParent(wxEvent& event), return DoTryApp(event); )
^
D:\wx3\include/wx/defs.h:641:43: note: in definition of macro 'wxDEPRECATED'
#define wxDEPRECATED(x) wxDEPRECATED_DECL x
^
D:\wx3\include/wx/event.h:3685:5: note: in expansion of macro 'wxDEPRECATED_BUT_USED_INTERNALLY_INLINE'
wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(
^
ProjectOptionsManipulator.cpp:1178:1: warning: 'virtual bool wxEvtHandler::TryValidator(wxEvent&)' is deprecated [-Wdeprecated-declarations]
...
--- End code ---
ollydbg:
--- Quote from: scarphin on October 04, 2015, 10:23:13 pm ---...
Do you require an xp or a win7 build? I'll pm you a link if I success (again if I can find some time, no promises ;)). Lastly be aware I'm using mingw-builds compiler not tdm if that matters.
--- End quote ---
I mean if you build a 32 bit binary C::B, I can test it on my 32bit winXP. Thanks.
ollydbg:
Hi, Tim, I just looked at the PCH relate topic, and I see that "WX_PRECOMP" is not needed in the codeblocks.cbp or codeblocks_w30.cbp, since we don't need a wx/wxprec.h in our C::B project, also we don't need to generate a single wxprec.h.gch. Since sdk.h already includes all the wx/xxx.h C::B needed, See our discussion here: patch to build C::B against wx 3.0 with PCH enabled
EDIT:
In the sdk_common.h, we have such code
--- Code: ---#if defined(NOPCH)
#undef CB_PRECOMP
#endif // NOPCH
#if ( defined(CB_PRECOMP) && !defined(WX_PRECOMP) )
#define WX_PRECOMP
#endif // CB_PRECOMP
// basic wxWidgets headers : this one itself will check for precompiled headers
// and if so will include a list of wx headers, at the bottom we add some more headers
// in the case of precompilation (note : some headers are in both lists)
// so even if NO CB_PRECOMP we can still have WX_PRECOMP turned on in this "wxprec" header
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "prep.h" // this is deliberately not inside the #ifdef block
#ifdef CB_PRECOMP
// some common wxWidgets headers
#include <wx/arrstr.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/checklst.h>
#include <wx/choice.h>
#include <wx/colordlg.h>
#include <wx/combobox.h>
#include <wx/confbase.h>
#include <wx/datetime.h>
#include <wx/dialog.h>
#include <wx/dir.h>
#include <wx/dynarray.h>
#include <wx/event.h>
#include <wx/file.h>
#include <wx/filename.h>
#include <wx/font.h>
#include <wx/frame.h>
#include <wx/fs_zip.h>
#include <wx/hashmap.h>
#include <wx/image.h>
#include <wx/imaglist.h>
#include <wx/intl.h>
#include <wx/list.h>
#include <wx/listbox.h>
#include <wx/listctrl.h>
#include <wx/log.h>
#include <wx/menu.h>
#include <wx/menuitem.h>
#include <wx/msgdlg.h>
#include <wx/notebook.h>
#include <wx/panel.h>
#include <wx/print.h>
#include <wx/process.h>
#include <wx/radiobox.h>
#include <wx/radiobut.h>
#include <wx/regex.h>
#include <wx/sizer.h>
#include <wx/socket.h>
#include <wx/spinctrl.h>
#include <wx/splitter.h>
#include <wx/stattext.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/thread.h>
#include <wx/timer.h>
#include <wx/toolbar.h>
#include <wx/treectrl.h>
#include <wx/txtstrm.h>
#include <wx/utils.h>
#include <wx/wfstream.h>
#include <wx/wxscintilla.h>
#include <wx/xrc/xmlres.h>
// basic headers
#include "settings.h"
#include "globals.h"
#include "sdk_events.h"
#include "cbexception.h"
// absolute base classes
#include "logger.h"
#include "editorbase.h"
#include "cbeditor.h"
#include "compileoptionsbase.h"
#include "compiletargetbase.h"
#include "projectbuildtarget.h"
#include "projectfile.h"
#include "cbplugin.h"
#include "cbproject.h"
#include "cbtool.h"
#include "cbworkspace.h"
#include "compilerfactory.h"
#include "compiler.h"
#include "workspaceloader.h"
#include "editorcolourset.h"
#include "pipedprocess.h"
#include "scrollingdialog.h"
#include "cbauibook.h"
// managers
#include "manager.h"
#include "configmanager.h"
#include "editormanager.h"
#include "logmanager.h"
#include "projectmanager.h"
#include "menuitemsmanager.h"
#include "scriptingmanager.h"
#include "toolsmanager.h"
#include "templatemanager.h"
#include "macrosmanager.h"
#include "pluginmanager.h"
#include "personalitymanager.h"
#include "uservarmanager.h"
#include "filemanager.h"
// other base files
#include "xtra_res.h"
#include "safedelete.h"
#include "infowindow.h"
#include "licenses.h"
#endif // CB_PRECOMP
--- End code ---
So, if wx/wxprec.h contains some extra header files we don't needed. Such as the ones not in below #ifdef
--- Code: ---#ifdef CB_PRECOMP
// some common wxWidgets headers
#include <wx/arrstr.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/checklst.h>
...
--- End code ---
stahta01:
--- Quote from: ollydbg on October 05, 2015, 07:44:05 am ---Hi, Tim, I just looked at the PCH relate topic, and I see that "WX_PRECOMP" is not needed in the codeblocks.cbp or codeblocks_w30.cbp, since we don't need a wx/wxprec.h in our C::B project, also we don't need to generate a single wxprec.h.gch. Since sdk.h already includes all the wx/xxx.h C::B needed, See our discussion here: patch to build C::B against wx 3.0 with PCH enabled
EDIT:
In the sdk_common.h, we have such code
--- Code: ---#if defined(NOPCH)
#undef CB_PRECOMP
#endif // NOPCH
#if ( defined(CB_PRECOMP) && !defined(WX_PRECOMP) )
#define WX_PRECOMP
#endif // CB_PRECOMP
// basic wxWidgets headers : this one itself will check for precompiled headers
// and if so will include a list of wx headers, at the bottom we add some more headers
// in the case of precompilation (note : some headers are in both lists)
// so even if NO CB_PRECOMP we can still have WX_PRECOMP turned on in this "wxprec" header
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "prep.h" // this is deliberately not inside the #ifdef block
#ifdef CB_PRECOMP
// some common wxWidgets headers
#include <wx/arrstr.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/checklst.h>
#include <wx/choice.h>
#include <wx/colordlg.h>
#include <wx/combobox.h>
#include <wx/confbase.h>
#include <wx/datetime.h>
#include <wx/dialog.h>
#include <wx/dir.h>
#include <wx/dynarray.h>
#include <wx/event.h>
#include <wx/file.h>
#include <wx/filename.h>
#include <wx/font.h>
#include <wx/frame.h>
#include <wx/fs_zip.h>
#include <wx/hashmap.h>
#include <wx/image.h>
#include <wx/imaglist.h>
#include <wx/intl.h>
#include <wx/list.h>
#include <wx/listbox.h>
#include <wx/listctrl.h>
#include <wx/log.h>
#include <wx/menu.h>
#include <wx/menuitem.h>
#include <wx/msgdlg.h>
#include <wx/notebook.h>
#include <wx/panel.h>
#include <wx/print.h>
#include <wx/process.h>
#include <wx/radiobox.h>
#include <wx/radiobut.h>
#include <wx/regex.h>
#include <wx/sizer.h>
#include <wx/socket.h>
#include <wx/spinctrl.h>
#include <wx/splitter.h>
#include <wx/stattext.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/thread.h>
#include <wx/timer.h>
#include <wx/toolbar.h>
#include <wx/treectrl.h>
#include <wx/txtstrm.h>
#include <wx/utils.h>
#include <wx/wfstream.h>
#include <wx/wxscintilla.h>
#include <wx/xrc/xmlres.h>
// basic headers
#include "settings.h"
#include "globals.h"
#include "sdk_events.h"
#include "cbexception.h"
// absolute base classes
#include "logger.h"
#include "editorbase.h"
#include "cbeditor.h"
#include "compileoptionsbase.h"
#include "compiletargetbase.h"
#include "projectbuildtarget.h"
#include "projectfile.h"
#include "cbplugin.h"
#include "cbproject.h"
#include "cbtool.h"
#include "cbworkspace.h"
#include "compilerfactory.h"
#include "compiler.h"
#include "workspaceloader.h"
#include "editorcolourset.h"
#include "pipedprocess.h"
#include "scrollingdialog.h"
#include "cbauibook.h"
// managers
#include "manager.h"
#include "configmanager.h"
#include "editormanager.h"
#include "logmanager.h"
#include "projectmanager.h"
#include "menuitemsmanager.h"
#include "scriptingmanager.h"
#include "toolsmanager.h"
#include "templatemanager.h"
#include "macrosmanager.h"
#include "pluginmanager.h"
#include "personalitymanager.h"
#include "uservarmanager.h"
#include "filemanager.h"
// other base files
#include "xtra_res.h"
#include "safedelete.h"
#include "infowindow.h"
#include "licenses.h"
#endif // CB_PRECOMP
--- End code ---
So, if wx/wxprec.h contains some extra header files we don't needed. Such as the ones not in below #ifdef
--- Code: ---#ifdef CB_PRECOMP
// some common wxWidgets headers
#include <wx/arrstr.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/checklst.h>
...
--- End code ---
--- End quote ---
I agree that setting WX_PRECOMP in any cbp files is NOT needed or wanted. But, remember for Windows we still need both headers sdk.h and sdk_precomp.h (might have misspelled the second one).
Edit: I think you are asking if we must include the wx PCH header inside sdk_common.h header; the answer is no; but, it tends to result in a few weird errors at times when Compiling CB against 3.0.x branch and 3.1.x master branch.
Most of the errors go away if we include wx/defs.h before any wx header inside the sdk_common.h header.
The rest would likely need to be fixed on a case by case basis.
Note: I have decided that "sdk" is more accurate than <sdk.h> because the PCH file is always a local project file and never a system header using MinGW GCC and likely all GCC are the same. Not, sure about other compilers.
Tim S.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version