On the Building of Code::Blocks against wxWidgets are you having:
Compiler errors?
Linking errors?
or Run-time errors?
It compiled and linked OK for me then I get run-time errors.
patch for CodeBlocks.cbp; that I am using on second re-build of Code::Blocks trunk; it has not finished yet. I will check on it in morning. CB Loaded OK
Index: src/CodeBlocks.cbp
===================================================================
--- src/CodeBlocks.cbp (revision 6647)
+++ src/CodeBlocks.cbp (working copy)
@@ -128,27 +128,6 @@
<Add library="gdi32" />
</Linker>
</Target>
- <Target title="wxpropgrid">
- <Option output="devel\wxpropgrid" prefix_auto="1" extension_auto="1" />
- <Option working_dir="devel" />
- <Option type="3" />
- <Option compiler="gcc" />
- <Option createStaticLib="1" />
- <Compiler>
- <Add option="-DWXMAKINGDLL_PROPGRID" />
- <Add option="-DwxPG_USE_WXMODULE=0" />
- <Add directory="sdk\wxpropgrid\include" />
- <Add directory="include" />
- </Compiler>
- <ResourceCompiler>
- <Add directory="sdk\wxpropgrid\include" />
- </ResourceCompiler>
- <Linker>
- <Add option="-Wl,--enable-auto-image-base" />
- <Add option="-Wl,--add-stdcall-alias" />
- <Add option="-Wl,--enable-auto-import" />
- </Linker>
- </Target>
<Target title="sdk">
<Option output="devel\codeblocks" prefix_auto="1" extension_auto="1" />
<Option working_dir="devel" />
@@ -169,7 +148,6 @@
<Add directory="include\scripting\include" />
<Add directory="include\scripting\sqplus" />
<Add directory="include\mozilla_chardet" />
- <Add directory="sdk\wxpropgrid\include" />
</Compiler>
<Linker>
<Add option="-Wl,--enable-auto-image-base" />
@@ -179,13 +157,11 @@
<Add library="shfolder" />
<Add library="txml" />
<Add library="wxscintilla" />
- <Add library="wxpropgrid" />
<Add library="sqplus" />
<Add library="sqstdlib" />
<Add library="squirrel" />
<Add directory="devel" />
<Add directory="sdk\scripting\lib" />
- <Add directory="sdk\propgrid" />
</Linker>
<ExtraCommands>
<Add before="build_tools/autorevision/autorevision +wx +int +t . include/autorevision.h" />
@@ -212,7 +188,6 @@
<Add option="-Wl,--enable-auto-import" />
<Add library="codeblocks" />
<Add library="wxscintilla" />
- <Add library="wxpropgrid" />
<Add library="shfolder" />
<Add library="kernel32" />
<Add library="user32" />
@@ -532,14 +507,14 @@
</Target>
<Environment>
<Variable name="WX_SUFFIX" value="u" />
- <Variable name="WX_VERSION" value="28" />
+ <Variable name="WX_VERSION" value="29" />
<Variable name="WX_CFG" value="" />
</Environment>
</Build>
<VirtualTargets>
- <Add alias="All" targets="tinyXML;AutoRevision;ConsoleRunner;Squirrel;Squirrel std lib;SqPlus;scintilla;wxpropgrid;sdk;src;AStyle;Compiler depslib;Compiler;Debugger;Code-completion;Class wizard;Default MIME handler;Open files list;Scripted wizard;To-do;Autosave;XP look & feel;Projects-workspaces importer;" />
+ <Add alias="All" targets="tinyXML;AutoRevision;ConsoleRunner;Squirrel;Squirrel std lib;SqPlus;scintilla;sdk;src;AStyle;Compiler depslib;Compiler;Debugger;Code-completion;Class wizard;Default MIME handler;Open files list;Scripted wizard;To-do;Autosave;XP look & feel;Projects-workspaces importer;" />
<Add alias="Core app & plugins" targets="sdk;src;AStyle;Autosave;Compiler depslib;Compiler;Debugger;Code-completion;Class wizard;Default MIME handler;Projects-workspaces importer;Scripted wizard;Open files list;To-do;XP look & feel;" />
- <Add alias="Third-party libs" targets="tinyXML;AutoRevision;ConsoleRunner;Squirrel;Squirrel std lib;SqPlus;scintilla;wxpropgrid;Compiler depslib;" />
+ <Add alias="Third-party libs" targets="tinyXML;AutoRevision;ConsoleRunner;Squirrel;Squirrel std lib;SqPlus;scintilla;Compiler depslib;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
@@ -560,7 +535,6 @@
<Add directory="$(#wx)\contrib\include" />
<Add directory="$(#WX.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX)" />
<Add directory="sdk\wxscintilla\include" />
- <Add directory="sdk\wxpropgrid\include" />
<Add directory="include\tinyxml" />
</Compiler>
<ResourceCompiler>
@@ -2715,57 +2689,6 @@
<Unit filename="sdk\workspaceloader.cpp">
<Option target="sdk" />
</Unit>
- <Unit filename="sdk\wxpropgrid\include\wx\propgrid\advprops.h">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\include\wx\propgrid\editors.h">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\include\wx\propgrid\extras.h">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\include\wx\propgrid\manager.h">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\include\wx\propgrid\odcombo.h">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\include\wx\propgrid\propdev.h">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\include\wx\propgrid\propgrid.h">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\include\wx\propgrid\props.h">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\include\wx\propgrid\xh_propgrid.h">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\src\advprops.cpp">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\src\editors.cpp">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\src\extras.cpp">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\src\manager.cpp">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\src\odcombo.cpp">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\src\propgrid.cpp">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\src\props.cpp">
- <Option target="wxpropgrid" />
- </Unit>
- <Unit filename="sdk\wxpropgrid\src\xh_propgrid.cpp">
- <Option target="wxpropgrid" />
- </Unit>
<Unit filename="sdk\wxscintilla\include\wx\wxscintilla.h">
<Option target="scintilla" />
</Unit>
Tim S.
I used the new Build of Code::Blocks linked against wxWidgets trunk to build Code::Blocks. It still has an issue on shutdown.
Did not try the contrib plugins; took me several hours and still two or three contrib plugins failed last time I tried 3 or so months ago.
Note: I was the person who started the first two threads on building C::B with wxWidgets 2.9.x.
Note: I have never gotten C::B to build and run using 64Bit TDM/other MinGW GCC under Windows.
In setup.h make sure "wxUSE_STC" is defined as "0". Note, use "USE_OPENGL=1" is not required.
mingw32-make -f makefile.gcc USE_QA=1 USE_STC=0 USE_OPENGL=1 BUILD=release UNICODE=1 MONOLITHIC=1 SHARED=1
Tim S.
I finally got around to trying this. I can now build the latest wx 2.9.2 SVN but CB refuses to co-operate. I get errors relating to scintilla. I applied the patch to a fress project file, although i had dome much the same myself. No go.
||=== Code::Blocks, sdk ===|
C:\Utilities\Programming\CBfor2.9\src\sdk\encodingdetector.cpp||In member function 'bool EncodingDetector::ConvertToWxStr(const wxByte*, size_t)':|
C:\Utilities\Programming\CBfor2.9\src\sdk\encodingdetector.cpp|138|warning: value computed is not used|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|811|undefined reference to `_imp___ZN11wxScintilla7SetZoomEi'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|816|undefined reference to `_imp___ZN11wxScintilla13SetMarginMaskEii'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|817|undefined reference to `_imp___ZN11wxScintilla13SetMarginMaskEii'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|818|undefined reference to `_imp___ZN11wxScintilla13SetMarginMaskEii'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|819|undefined reference to `_imp___ZN11wxScintilla13SetMarginMaskEii'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|879|undefined reference to `_imp___ZNK11wxScintilla9GetModifyEv'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|889|undefined reference to `_imp___ZN11wxScintilla12SetSavePointEv'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|895|undefined reference to `_imp___ZNK11wxScintilla11GetReadOnlyEv'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|926|undefined reference to `_imp___ZN11wxScintilla7GotoPosEi'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|927|undefined reference to `_imp___ZN11wxScintilla12ScrollToLineEi'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|928|undefined reference to `_imp___ZN11wxScintilla14ScrollToColumnEi'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|961|undefined reference to `_imp___ZNK11wxScintilla13GetCurrentPosEv'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|962|undefined reference to `_imp___ZNK11wxScintilla19GetFirstVisibleLineEv'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|969|undefined reference to `_imp___ZN11wxScintilla12MarkerDefineEiiRK8wxColourS2_'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|970|undefined reference to `_imp___ZN11wxScintilla19MarkerSetForegroundEiRK8wxColour'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|971|undefined reference to `_imp___ZN11wxScintilla19MarkerSetBackgroundEiRK8wxColour'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|975|undefined reference to `_imp___ZN11wxScintilla12MarkerDefineEiiRK8wxColourS2_'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|976|undefined reference to `_imp___ZN11wxScintilla19MarkerSetForegroundEiRK8wxColour'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|977|undefined reference to `_imp___ZN11wxScintilla19MarkerSetBackgroundEiRK8wxColour'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|983|undefined reference to `_imp___ZN11wxScintilla12SetFoldFlagsEi'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|985|undefined reference to `_imp___ZN11wxScintilla12SetFoldFlagsEi'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|998|undefined reference to `_imp___ZN11wxScintilla8UsePopUpEb'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1006|undefined reference to `_imp__wxEVT_SCI_MARGINCLICK'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1009|undefined reference to `_imp__wxEVT_SCI_UPDATEUI'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1012|undefined reference to `_imp__wxEVT_SCI_CHANGE'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1015|undefined reference to `_imp__wxEVT_SCI_CHARADDED'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1018|undefined reference to `_imp__wxEVT_SCI_DWELLSTART'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1021|undefined reference to `_imp__wxEVT_SCI_DWELLEND'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1024|undefined reference to `_imp__wxEVT_SCI_USERLISTSELECTION'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1027|undefined reference to `_imp__wxEVT_SCI_MODIFIED'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_STYLENEEDED'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_SAVEPOINTREACHED'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_SAVEPOINTLEFT'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_ROMODIFYATTEMPT'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_KEY'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_DOUBLECLICK'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_MACRORECORD'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_NEEDSHOWN'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_PAINTED'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_URIDROPPED'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_START_DRAG'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_DRAG_OVER'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_DO_DROP'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_ZOOM'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_HOTSPOT_CLICK'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_HOTSPOT_DCLICK'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_CALLTIP_CLICK'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1068|undefined reference to `_imp__wxEVT_SCI_AUTOCOMP_SELECTION'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1122|undefined reference to `_imp___ZN11wxScintilla13GetDocPointerEv'|
.objs\sdk\cbeditor.o:C:\Utilities\Programming\CBfor2.9\src\sdk\cbeditor.cpp|1122|undefined reference to `_imp___ZN11wxScintilla13SetDocPointerEPv'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 8 warnings (4 minutes, 12 seconds) ===|
I tried adding it in several places. No change. It shouldn't be necessary to change that, anyway. I can't see why that would be any different.
Any ideas?
In setup.h make sure "wxUSE_STC" is defined as "0". Note, use "USE_OPENGL=1" is not required.
mingw32-make -f makefile.gcc USE_QA=1 USE_STC=0 USE_OPENGL=1 BUILD=release UNICODE=1 MONOLITHIC=1 SHARED=1
When start build wxWidgets, you need change "include\wx\msw\setup0.h".
// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla.
//
// Default is 1
//
// Recommended setting: 1
#define wxUSE_STC 1
The default value is 1, so we need set the value to 0.
There is a possible way: using MONOLITHIC = 0
I am trying, and feedback the result.
make -f makefile.gcc LDFLAGS=-s SHARED=1 BUILD=release UNICODE=1 MONOLITHIC=0 OFFICIAL_BUILD=1 RUNTIME_LIBS=static >nul
In wx2.9.2svn, the MONOLITHIC default to 0
# Multiple libraries or single huge monolithic one? [0,1]
MONOLITHIC ?= 0
but you have to use "our" scintilla, because there are some C::B specific patches we use.
Maybe we can move the specific patches from wxScintilla to cbEditor or cbStyledTextCtrl?
I am trying, but I found it is impossible.
/*
* This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
* http://www.gnu.org/licenses/lgpl-3.0.html
*/
#ifndef CBSCINTILLA_H
#define CBSCINTILLA_H
#if wxCHECK_VERSION(2, 9, 2)
#include <wx/stc/stc.h>
#define cbSCI_KEYWORDSET_MAX wxSTC_KEYWORDSET_MAX
#define cbSCI_EOL_LF wxSTC_EOL_LF
#define cbSCI_EOL_CR wxSTC_EOL_CR
#define cbSCI_C_COMMENT wxSTC_C_COMMENT
#define cbSCI_C_COMMENTDOC wxSTC_C_COMMENTDOC
#define cbSCI_C_COMMENTDOCKEYWORD wxSTC_C_COMMENTDOCKEYWORD
#define cbSCI_C_COMMENTDOCKEYWORDERROR wxSTC_C_COMMENTDOCKEYWORDERROR
#define cbSCI_C_COMMENTLINE wxSTC_C_COMMENTLINE
#define cbSCI_C_COMMENTLINEDOC wxSTC_C_COMMENTLINEDOC
#define cbSCI_D_COMMENT wxSTC_D_COMMENT
#define cbSCI_D_COMMENTDOC wxSTC_D_COMMENTDOC
#define cbSCI_D_COMMENTDOCKEYWORD wxSTC_D_COMMENTDOCKEYWORD
#define cbSCI_D_COMMENTDOCKEYWORDERROR wxSTC_D_COMMENTDOCKEYWORDERROR
#define cbSCI_D_COMMENTLINE wxSTC_D_COMMENTLINE
#define cbSCI_D_COMMENTLINEDOC wxSTC_D_COMMENTLINEDOC
#define cbSCI_LEX_CPP wxSTC_LEX_CPP
#define cbSCI_LEX_D wxSTC_LEX_D
#define cbSCI_C_PREPROCESSOR wxSTC_C_PREPROCESSOR
#define cbSCI_C_STRING wxSTC_C_STRING
#define cbSCI_C_CHARACTER wxSTC_C_CHARACTER
#define cbSCI_C_CHARACTER wxSTC_C_CHARACTER
#define cbSCI_D_PREPROCESSOR wxSTC_D_PREPROCESSOR
#define cbSCI_D_STRING wxSTC_D_STRING
#define cbSCI_D_CHARACTER wxSTC_D_CHARACTER
#define cbSCI_D_CHARACTER wxSTC_D_CHARACTER
#define cbSCI_STYLE_LINENUMBER wxSTC_STYLE_LINENUMBER
#define cbSCI_INDIC_HIGHLIGHT wxSTC_INDIC_HIGHLIGHT
#define cbSCI_FIND_MATCHCASE wxSTC_FIND_MATCHCASE
#define cbSCI_FIND_WHOLEWORD wxSTC_FIND_WHOLEWORD
#define cbSCI_KEY_HOME wxSTC_KEY_HOME
#define cbSCI_KEY_END wxSTC_KEY_END
#define cbSCI_SCMOD_NORM wxSTC_SCMOD_NORM
#define cbSCI_SCMOD_SHIFT wxSTC_SCMOD_SHIFT
#define cbSCI_SCMOD_ALT wxSTC_SCMOD_ALT
#define cbSCI_CMD_HOME wxSTC_CMD_HOME
#define cbSCI_CMD_HOMEEXTEND wxSTC_CMD_HOMEEXTEND
#define cbSCI_CMD_HOMERECTEXTEND wxSTC_CMD_HOMERECTEXTEND
#define cbSCI_CMD_VCHOME wxSTC_CMD_VCHOME
#define cbSCI_CMD_VCHOMEEXTEND wxSTC_CMD_VCHOMEEXTEND
#define cbSCI_CMD_VCHOMERECTEXTEND wxSTC_CMD_VCHOMERECTEXTEND
#define cbSCI_CMD_LINEENDWRAP wxSTC_CMD_LINEENDWRAP
#define cbSCI_IV_LOOKBOTH wxSTC_IV_LOOKBOTH
#define cbSCI_IV_NONE wxSTC_IV_NONE
class cbScintilla : public wxStyledTextCtrl
{
public:
cbScintilla(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0)
: wxStyledTextCtrl(parent, id, pos, size, style)
{
}
};
#else // !wxCHECK_VERSION(2, 9, 2)
#define cbSCI_INVALID_POSITION wxSCI_INVALID_POSITION
#define cbSCI_KEYWORDSET_MAX wxSCI_KEYWORDSET_MAX
#define cbSCI_EOL_LF wxSCI_EOL_LF
#define cbSCI_EOL_CR wxSCI_EOL_CR
#define cbSCI_C_COMMENT wxSCI_C_COMMENT
#define cbSCI_C_COMMENTDOC wxSCI_C_COMMENTDOC
#define cbSCI_C_COMMENTDOCKEYWORD wxSCI_C_COMMENTDOCKEYWORD
#define cbSCI_C_COMMENTDOCKEYWORDERROR wxSCI_C_COMMENTDOCKEYWORDERROR
#define cbSCI_C_COMMENTLINE wxSCI_C_COMMENTLINE
#define cbSCI_C_COMMENTLINEDOC wxSCI_C_COMMENTLINEDOC
#define cbSCI_D_COMMENT wxSCI_D_COMMENT
#define cbSCI_D_COMMENTDOC wxSCI_D_COMMENTDOC
#define cbSCI_D_COMMENTDOCKEYWORD wxSCI_D_COMMENTDOCKEYWORD
#define cbSCI_D_COMMENTDOCKEYWORDERROR wxSCI_D_COMMENTDOCKEYWORDERROR
#define cbSCI_D_COMMENTLINE wxSCI_D_COMMENTLINE
#define cbSCI_D_COMMENTLINEDOC wxSCI_D_COMMENTLINEDOC
#define cbSCI_LEX_CPP wxSCI_LEX_CPP
#define cbSCI_LEX_D wxSCI_LEX_D
#define cbSCI_C_PREPROCESSOR wxSCI_C_PREPROCESSOR
#define cbSCI_C_STRING wxSCI_C_STRING
#define cbSCI_C_CHARACTER wxSCI_C_CHARACTER
#define cbSCI_C_CHARACTER wxSCI_C_CHARACTER
#define cbSCI_D_PREPROCESSOR wxSCI_D_PREPROCESSOR
#define cbSCI_D_STRING wxSCI_D_STRING
#define cbSCI_D_CHARACTER wxSCI_D_CHARACTER
#define cbSCI_D_CHARACTER wxSCI_D_CHARACTER
#define cbSCI_STYLE_LINENUMBER wxSCI_STYLE_LINENUMBER
#define cbSCI_INDIC_HIGHLIGHT wxSCI_INDIC_HIGHLIGHT
#define cbSCI_FIND_MATCHCASE wxSCI_FIND_MATCHCASE
#define cbSCI_FIND_WHOLEWORD wxSCI_FIND_WHOLEWORD
#define cbSCI_KEY_HOME wxSCI_KEY_HOME
#define cbSCI_KEY_END wxSCI_KEY_END
#define cbSCI_SCMOD_NORM wxSCI_SCMOD_NORM
#define cbSCI_SCMOD_SHIFT wxSCI_SCMOD_SHIFT
#define cbSCI_SCMOD_ALT wxSCI_SCMOD_ALT
#define cbSCI_CMD_HOME wxSCI_CMD_HOME
#define cbSCI_CMD_HOMEEXTEND wxSCI_CMD_HOMEEXTEND
#define cbSCI_CMD_HOMERECTEXTEND wxSCI_CMD_HOMERECTEXTEND
#define cbSCI_CMD_VCHOME wxSCI_CMD_VCHOME
#define cbSCI_CMD_VCHOMEEXTEND wxSCI_CMD_VCHOMEEXTEND
#define cbSCI_CMD_VCHOMERECTEXTEND wxSCI_CMD_VCHOMERECTEXTEND
#define cbSCI_CMD_LINEENDWRAP wxSCI_CMD_LINEENDWRAP
#define cbSCI_IV_LOOKBOTH wxSCI_IV_LOOKBOTH
#define cbSCI_IV_NONE wxSCI_IV_NONE
class cbScintilla : public wxScintilla
{
public:
cbScintilla(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0)
: wxScintilla(parent, id, pos, size, style)
{
}
};
#endif // wxCHECK_VERSION(2, 9, 2)
#endif // CBSCINTILLA_H
And I have some questions:
void Editor::NotifyStyleToNeeded(int endStyleNeeded) {
/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
scn.nmhdr.code = SCN_STYLENEEDED;
scn.position = endStyleNeeded;
NotifyParent(scn);
}
void Editor::NotifyStyleNeeded(Document *, void *, int endStyleNeeded) {
NotifyStyleToNeeded(endStyleNeeded);
}
void Editor::NotifyLexerChanged(Document *, void *) {
}
void Editor::NotifyErrorOccurred(Document *, void *, int status) {
errorStatus = status;
}
void Editor::NotifyChar(int ch) {
/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
scn.nmhdr.code = SCN_CHARADDED;
scn.ch = ch;
NotifyParent(scn);
}
void Editor::NotifySavePoint(bool isSavePoint) {
/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
if (isSavePoint) {
scn.nmhdr.code = SCN_SAVEPOINTREACHED;
} else {
scn.nmhdr.code = SCN_SAVEPOINTLEFT;
}
NotifyParent(scn);
}
void Editor::NotifyModifyAttempt() {
/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
scn.nmhdr.code = SCN_MODIFYATTEMPTRO;
NotifyParent(scn);
}
void Editor::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) {
/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
scn.nmhdr.code = SCN_DOUBLECLICK;
scn.line = LineFromLocation(pt);
scn.position = PositionFromLocation(pt, true);
scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
(alt ? SCI_ALT : 0);
NotifyParent(scn);
}
void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt) {
/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
scn.nmhdr.code = SCN_HOTSPOTDOUBLECLICK;
scn.position = position;
scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
(alt ? SCI_ALT : 0);
NotifyParent(scn);
}
void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) {
/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
scn.nmhdr.code = SCN_HOTSPOTCLICK;
scn.position = position;
scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
(alt ? SCI_ALT : 0);
NotifyParent(scn);
}
void Editor::NotifyUpdateUI() {
/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
scn.nmhdr.code = SCN_UPDATEUI;
NotifyParent(scn);
}
void Editor::NotifyPainted() {
/* C::B begin */
SCNotification scn; memset((void*)&scn, 0, sizeof(scn));
/* C::B end */
scn.nmhdr.code = SCN_PAINTED;
NotifyParent(scn);
}
................
It seems the "C::B begin" and "C::B end" flag is error position?
New configure:
make -f makefile.gcc LDFLAGS=-s SHARED=1 BUILD=debug UNICODE=1 DEBUG_INFO=0 DEBUG_FLAG=1 MONOLITHIC=0 OFFICIAL_BUILD=1 RUNTIME_LIBS=static >nul
make -f makefile.gcc LDFLAGS=-s SHARED=1 BUILD=release UNICODE=1 DEBUG_INFO=0 DEBUG_FLAG=0 MONOLITHIC=0 OFFICIAL_BUILD=1 RUNTIME_LIBS=static >nul
see: http://trac.wxwidgets.org/ticket/12574 (http://trac.wxwidgets.org/ticket/12574)
Sorry to bump an old thread, but I cannot build C::B using wxWidgets 2.9.1... I have an error while compiling the SDK:
-------------- Build: sdk in Code::Blocks ---------------
mingw32-g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DwxDEBUG_LEVEL=0 -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_PROPGRID -DwxPG_USE_WXMODULE=1 -DWXMAKINGDLL_SCI -IC:\Work\wxWidgets-2.9.1\include -IC:\Work\wxWidgets-2.9.1\contrib\include -IC:\Work\wxWidgets-2.9.1\lib\gcc_dll_32\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\bindings -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -c C:\Work\codeblocks_trunk64\src\sdk\cbauibook.cpp -o .objs\sdk\cbauibook.o
C:\Work\wxWidgets-2.9.1\include/wx/event.h: In member function 'void cbAuiNotebook::MinimizeFreeSpace(wxAuiTabCtrl*)':
C:\Work\wxWidgets-2.9.1\include/wx/event.h:2997:18: error: 'virtual bool wxEvtHandler::ProcessEvent(wxEvent&)' is inaccessible
C:\Work\codeblocks_trunk64\src\sdk\cbauibook.cpp:520:36: error: within this context
I've changed setup0.h (wxUSE_STC=0) and used the following command line to build wxWidgets:
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 USE_STC=0 USE_PROPGRID=1 BUILD=release clean
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 USE_STC=0 USE_PROPGRID=1 BUILD=release
I'm trying to build on Vista 32 with MINGW gcc (tdm). Result of gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw32/bin/../libexec/gcc/mingw32/4.5.1/lto-wrapper.exe
Target: mingw32
Configured with: ../../src/gcc-4.5.1/configure --build=mingw32 --enable-languages=c,ada,c++,fortran,objc,obj-c++ --enable-threads=win32 --enable-libgomp --enabl
e-lto --enable-fully-dynamic-string --enable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-nls --disable-win32-registry --disable-symvers --p
refix=/mingw --disable-werror --enable-cxx-flags='-fno-function-sections -fno-data-sections' --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http
://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.5.1 (tdm-1)
I don't quite get the error, any help would be appreciated...
Edit:
I'm using the CodeBlocks_wx29 project and latest version from trunk r7032...
#0 0x7ffff1552629 free() (/lib64/libc.so.6:??)
#1 0x45d44d wxString::ConvertedBuffer<wchar_t>::~ConvertedBuffer(this=0x7fffffffada8, __in_chrg=<optimized out>) (/usr/include/wx-2.9/wx/string.h:3518)
#2 0x45a7e9 wxString::~wxString(this=0x7fffffffad90, __in_chrg=<optimized out>) (/usr/include/wx-2.9/wx/string.h:1340)
#3 0x7fffd488ab95 ParserCommon::FileType(filename=..., force_refresh=true) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/plugins/codecompletion/parser/parser.cpp:101)
#4 0x7fffd488be2e ParserBase::ReadOptions(this=0x15c5a70) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/plugins/codecompletion/parser/parser.cpp:203)
#5 0x7fffd488b1e7 ParserBase::ParserBase(this=0x15c5a70) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/plugins/codecompletion/parser/parser.cpp:143)
#6 0x7fffd48b44f4 NativeParser::NativeParser(this=0x15f9ff8) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/plugins/codecompletion/nativeparser.cpp:288)
#7 0x7fffd482cd17 CodeCompletion::CodeCompletion(this=0x15f9f70) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/plugins/codecompletion/codecompletion.cpp:486)
#8 0x7fffd48504bf PluginRegistrant<CodeCompletion>::CreatePlugin() (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/include/cbplugin.h:613)
#9 0x7ffff2646ac9 PluginManager::LoadPlugin(this=0x11c41b0, pluginName=...) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/sdk/pluginmanager.cpp:1044)
#10 0x7ffff2646479 PluginManager::ScanForPlugins(this=0x11c41b0, path=...) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/sdk/pluginmanager.cpp:985)
#11 0x48bac8 MainFrame::ScanForPlugins(this=0xcab870) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/src/main.cpp:1061)
#12 0x486e2d MainFrame::MainFrame(this=0xcab870, parent=0x0) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/src/main.cpp:571)
#13 0x47a3b8 CodeBlocksApp::InitFrame(this=0x7799e0) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/src/app.cpp:417)
#14 0x47bc4d CodeBlocksApp::OnInit(this=0x7799e0) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/src/app.cpp:642)
#15 0x480889 wxAppConsoleBase::CallOnInit(this=0x7799e0) (/usr/include/wx-2.9/wx/app.h:94)
#16 0x7ffff323fb34 wxEntry(int&, wchar_t**) () (/usr/lib64/libwx_baseu-2.9.so.3:??)
#17 0x479d3e main(argc=6, argv=0x7fffffffdaf8) (/home/obfuscated/projects/codeblocks/dev/trunk_clean/src/src/app.cpp:261)
Here is the crash log, I'm using the -DCC_NO_COLLAPSE_ITEM option. wxGTK 2.9.3.1 on gentoo linux 64bit.
I just test it again right now, the result is:
C::B nightly build against wx2.8.12.
Project 'Code::Blocks' parsing stage done (1419 total parsed files, 125538 tokens in 0 minute(s), 28.516 seconds).
C::B trunk build myself against wx2.9.3
Project 'Code::Blocks' parsing stage done (1419 total parsed files, 125621 tokens in 0 minute(s), 32.652 seconds).
So, it looks like there are not much difference. :)
The setting can be edited in setup.h prior to compiling.
Just uncomment this section:
// ----------------------------------------------------------------------------
// debugging settings
// ----------------------------------------------------------------------------
// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no
// need to define it here. You may do it for two reasons: either completely
// disable/compile out the asserts in release version (then do it inside #ifdef
// NDEBUG) or, on the contrary, enable more asserts, including the usually
// disabled ones, in the debug build (then do it inside #ifndef NDEBUG)
//
#ifdef NDEBUG
#define wxDEBUG_LEVEL 0
#else
#define wxDEBUG_LEVEL 2
#endif
Also, it would be interesting to know which wxString implementation 2.9.x uses. I've heard that as of 2.9.x, wxString is a wrapper to std::string (or std::wstring) by default. How does each implementation impact the performance?