svn info
Path: .
Working Copy Root Path: /home/me/codeblocks-code
URL: svn://svn.code.sf.net/p/codeblocks/code/trunk
Relative URL: ^/trunk
Repository Root: svn://svn.code.sf.net/p/codeblocks/code
Repository UUID: 2a5c6006-c6dd-42ca-98ab-0921f2732cef
Revision: 9760
Node Kind: directory
Schedule: normal
Last Changed Author: fuscated
Last Changed Rev: 9760
Last Changed Date: 2014-04-26 08:23:22 -0600 (Sat, 26 Apr 2014)
uname -r: 3.14.1-1-ARCH
installed from Arch wxgtk 3.0.0-3 (stock not customized)
ran ./bootstrap and ./configure without problems
make fails with error
g++ -DHAVE_CONFIG_H -I/usr/lib/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../src/include -I../../src/sdk/wxscintilla/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet -I../../src/include/mozilla_chardet/mfbt -I../../src/include/mozilla_chardet/nsprpub/pr/include -I../../src/include/mozilla_chardet/xpcom -I../../src/include/mozilla_chardet/xpcom/base -I../../src/include/mozilla_chardet/xpcom/glue -ansi -DTIXML_USE_STL -O2 -ffast-math -DCB_AUTOCONF -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -o ../../src/include/sdk_precomp.h.gch -xc++-header ./sdk_precomp.h
In file included from ./sdk_common.h:144:0,
from ./sdk_precomp.h:13:
./toolsmanager.h:46:32: error: ‘ToolsList::Node’ has not been declared
void DoRemoveTool(ToolsList::Node* node);
^
Makefile:967: recipe for target '../../src/include/sdk_precomp.h.gch' failed
Google search shows reference to forum thread:
http://forums.codeblocks.org/index.php?topic=18201.0;wap2 (http://forums.codeblocks.org/index.php?topic=18201.0;wap2)
discussion was about using custom wxWidgets build.
Using stock wxWidgets from Arch.
Hm, probably your versoin of wxGTK 3.0 is configured in a wrong way, because here it builds just fine with the wx3.0 from a gentoo default install.
Edit:
Note that if you compile wxWidgets in STL mode (wxUSE_STL defined as 1) then wxList<T> will actually derive from std::list and just add a legacy compatibility layer for the old wxList class.
Probably this is the problematic part.
found it...
Arch maintainer used the STL flag to build
from the pkgbuild file...
build() {
cd wxWidgets-${pkgver}
./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \
--enable-graphics_ctx --enable-mediactrl --enable-webview --enable-stl --with-regex=builtin \
--with-libpng=sys --with-libxpm=sys --with-libjpeg=sys --with-libtiff=sys \
--disable-precomp-headers
make
make -C locale allmo
Can you try this patch (I've tried if it will compile, but not if it runs correctly):
http://cmpt.benbmp.org/codeblocks/patches/wx3.stl.patch
patching was painful. I'm assuming you were outside the codeblocks folder when you made it?
anyway...
I can get make to build past the point of the previous error.
However, the build process balks at SQL.
In file included from ../../../../src/include/scripting/bindings/sc_base_types.h:27:0,
from sc_wxtypes.cpp:18:
../../../../src/include/scripting/sqplus/sqplus.h: In instantiation of 'static SQInteger SqPlus::DirectCallInstanceMemberFunction<Callee, Func>::Dispatch(HSQUIRRELVM) [with Callee = wxArrayString; Func = void (wxArrayStringBase::*)(); SQInteger = long int; HSQUIRRELVM = SQVM*]':
../../../../src/include/scripting/sqplus/sqplus.h:1313:86: required from 'void SqPlus::sq_pushdirectinstanceclosure(HSQUIRRELVM, const Callee&, Func, SQUnsignedInteger) [with Callee = wxArrayString; Func = void (wxArrayStringBase::*)(); HSQUIRRELVM = SQVM*; SQUnsignedInteger = long unsigned int]'
../../../../src/include/scripting/sqplus/sqplus.h:1397:47: required from 'void SqPlus::RegisterInstance(HSQUIRRELVM, HSQOBJECT, Callee&, Func, const SQChar*) [with Callee = wxArrayString; Func = void (wxArrayStringBase::*)(); HSQUIRRELVM = SQVM*; HSQOBJECT = tagSQObject; SQChar = char]'
../../../../src/include/scripting/sqplus/sqplus.h:1751:79: required from 'SqPlus::SQClassDef<TClassType>& SqPlus::SQClassDef<TClassType>::func(Func, const SQChar*) [with Func = void (wxArrayStringBase::*)(); TClassType = wxArrayString; SQChar = char]'
sc_wxtypes.cpp:253:52: required from here
../../../../src/include/scripting/sqplus/sqplus.h:1244:36: error: no matching function for call to 'Call(wxArrayString&, void (wxArrayStringBase::*&)(), SQVM*&, int)'
return Call(*instance,*func,v,2);
^
;D ;D ;D ;D ::) ::) :P
touchdown...crowd goes wild!!!
@oBFusCATed - patch worked great
and you were right about the wx-config switch. again, my bad. apologies
build successful
wx-widgets
/opt/wx30/bin/wx-config --version-full
3.1.0.0
(latest from github)
code::blocks - Revision: 9760
found references for using PCH (http://forums.codeblocks.org/index.php/topic,17645.msg120814.html#msg120814) and bad build environment (http://forums.codeblocks.org/index.php/topic,19111.0.html)
ended up building and installing own wxW version using linux source build instructions (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux)
wxWidgets configure (bad):
../configure --prefix=/opt/wx30 --with-sdl --with-opengl --enable-stl --enable-xrc --enable-unicode --enable-mediactrl --enable-webview --enable-precomp-headers
applied wx3.stl.patch
C::B configure:
./configure --with-wx-config=/opt/wx30/bin/wx-config
configure would run to the end, but make would fail with all sorts of errors about undefined references to wx containers ( and there were vast numbers and varying types ).
I rebuilt wx but this time without STL
wxWidgets configure (good):
../configure --prefix=/opt/wx30 --with-sdl --with-opengl --enable-xrc --enable-unicode --enable-mediactrl --enable-webview --enable-precomp-headers
cleaned out C::B and the patch, used the same C::B configure line as above.
make ran to the end without errors (although a couple of warnings about deprecated wxFont scrolled by really fast ;) )
The two big differences noticed:
- STL containers flag
- the need to explicitly set pre-compiled headers. C::B make would fail on building the SDK - the error I was encountering after applying the patch
-> the first link hints at the need to explicitly set WX_PRECOMP value.
Once the configure lines were set up. Everything ran well.
Of note, someone did file a bug report (https://bugs.archlinux.org/task/39625) in late March about wxGTK using "--enable-stl".
The maintainer's answer was that another application needed the flag. I can't see Arch having two versions of the same library with different flag settings...
Of note, someone did file a bug report (https://bugs.archlinux.org/task/39625) in late March about wxGTK using "--enable-stl".
The maintainer's answer was that another application needed the flag. I can't see Arch having two versions of the same library with different flag settings...
FYI: IIRC, there is 2 to 4 options selecting STL in multiple ways.
Macros
wxUSE_STD_CONTAINERS
wxUSE_STD_IOSTREAM
wxUSE_STD_STRING
wxUSE_STL
The first option "--enable-stl" sets the other three.
Configure options.
--enable-stl
--enable-std_containers
--enable-std_iostreams
--enable-std_string
I remember one more weird testing macro that I could NOT find to add to this post had something to do with STL and archive streams.
Edit: Found the test macro WX_TEST_ARCHIVE_ITERATOR.
Edit: It is likely that the app did NOT need all three options set; you might try to research it. I would see if just --enable-std_iostreams and --enable-std_string was enough to fix it. This part of wxWidgets is poorly documented so I can see it being missed.
Tim S.
poedit "explicity" calls out the "--use-stl" flag.
from github README https://github.com/vslavik/poedit (https://github.com/vslavik/poedit)
Installing from sources
=========================
Requirements:
* Boost
* Unicode build of wxWidgets library, version >= 3.0, with --enable-stl (see http://www.wxwidgets.org)
* ICU
* LucenePlusPlus
* expat
* Berkeley DB >= 4.7 if you need legacy (pre-1.6) translation memory
* If on Unix, GtkSpell for spell checking support
As I said, C::B builds fine with wxtrunk (which is wx3.1).
I know there are a lot of deprectation warnings, I have fixed almost all of them in my working copy and will commit the fixes as soon as possible.
If I forget it, you can remember me to do it.
There is some private (family) stuff that takes a lot of my power the last weeks and will do it the next time (nothing I can influence).
Here...let me help...
Attached is all the warnings/deprecations I got from gcc48 build.
Should note: there is a warning message (starting line 117 ) for ExpressionExecutor.cpp and ExpressionTestCases.cpp
ExpressionExecutor.cpp:119:32: note: the ABI of passing union with long double has changed in GCC 4.4
Value Executor::GetResult( )
^
And the deprecation warnings stem from...
Just deprecate but don't schedule for removal wxNORMAL and friends.
Deprecate the use of the old untyped constants but don't schedule them from
removal in a future wx version by removing "#if WXWIN_COMPATIBILITY_3_0" tests
around their definition and use. Provoking deprecation warnings in the code
using these constants is worth it as they are unclear and it's easy to make
mistakes when using them, but breaking this code compilation outright can't be
justified -- even in the future.
I don't know if can help you more than that, Jens.
[attachment deleted by admin]
Try to make Code::Blocks compile when the wx uses "--use-stl" flag. (I have tried and failed on this; normally in the scripting section.)
some hint where? At the moment i don't have the resources to compile wx again...
It was months ago, IIRC it was in the script binding section.
I do NOT really have the harddisk space to compile wxWidgets right now either.
Next time I try I will try to post the errors.
Edit: trying to compile it now; I hope to get the error before the data/build disk is full.
Edit2: Made to sdk before error happened.
Tim S.
Several SDK issues when wxWidgets uses STL.
wxSafeConvertWX2MB function has compiler errors.
In file included from E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\cbplugin.cpp:42:0:
include/loggers.h: In member function 'virtual void StdoutLogger::Append(const wxString&, Logger::level)':
include/loggers.h:34:37: error: cannot convert 'const wxString' to 'const wchar_t*' for argument '1' to 'wxCharBuffer wxSafeConvertWX2MB(const wchar_t*)'
fputs(wxSafeConvertWX2MB(msg), lv < error ? stdout : stderr);
Manager::Get()->GetLogManager()->DebugLog has compiler errors
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\cbplugin.cpp: In member function 'void cbDebuggerPlugin::SwitchToDebuggingLayout()':
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\cbplugin.cpp:605:109: error: cannot convert 'const wxString' to 'const wxChar* {aka const wchar_t*}' for argument '1' to 'wxString F(const wxChar*, ...)'
Manager::Get()->GetLogManager()->DebugLog(F(_("Switching layout to \"%s\""), switchEvent.layout.wx_str()));
Manager::Get()->GetLogManager()->Log has compiler errors
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\editorcolourset.cpp: In member function 'void EditorColourSet::LoadAvailableSets()':
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\editorcolourset.cpp:116:96: error: cannot convert 'const wxString' to 'const wxChar* {aka const wchar_t*}' for argument '1' to 'wxString F(const wxChar*, ...)'
Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.wx_str()));
wxString function Index does not exist take a look at the Find function might be the correct replacement.
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\macrosmanager.cpp: In member function 'void MacrosManager::ReplaceMacros(wxString&, ProjectBuildTarget*, bool)':
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\macrosmanager.cpp:500:46: error: no matching function for call to 'wxString::Index(const wxString&)'
while ((index = buffer.Index(toNativePath)) != wxNOT_FOUND)
wxString function CompareTo does not take a look at the Cmp function might be the correct replacement.
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\pluginsconfigurationdlg.cpp: In function 'int sortByTitle(wxIntPtr, wxIntPtr, wxIntPtr)':
E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_git\svn-codeblocks-trunk\src\sdk\pluginsconfigurationdlg.cpp:47:57: error: no matching function for call to 'wxString::CompareTo(const wxString&) const'
return elem1->info.title.CompareTo(elem2->info.title);
Tim S.
I think, I've fixed almost all stl and wx31 build problems.
wxSmith still doesn't build, but I don't have time to fix it at the moment (it requires some major changes to the enums as far as I can tell).
The fixes could be found in the builds/wx31 branch in my repo on github.
https://github.com/obfuscated/codeblocks_sf/tree/builds/wx31
Please test and report if there are any problems. I've tested only on Linux with wx2.8, wx3.0 and wxtrunk. Only wxtrunk is compiled with stl support. I don't know about the others.
Built against wxWidgets 3.0 branch on Windows 7 32 bit.
No idea if these two changes are correct; I am really a C programmer NOT a C++ programmer.
diff --git a/src/plugins/contrib/help_plugin/help_plugin.cpp b/src/plugins/contrib/help_plugin/help_plugin.cpp
index f633783..d18cbcb 100644
--- a/src/plugins/contrib/help_plugin/help_plugin.cpp
+++ b/src/plugins/contrib/help_plugin/help_plugin.cpp
@@ -137,7 +137,7 @@ namespace
#if defined(_WIN64) | defined(WIN64)
fp_htmlHelp(0L, (const wxChar*)m_filename, cbHH_KEYWORD_LOOKUP, (DWORDLONG)&link);
#else
- fp_htmlHelp(0L, (const wxChar*)m_filename, cbHH_KEYWORD_LOOKUP, (DWORD)&link);
+ fp_htmlHelp(0L, std::wstring(m_filename).c_str(), cbHH_KEYWORD_LOOKUP, (DWORD)&link);
#endif
}
else // do it the wx way then (which is the same thing, except for the 0L in the call to fp_htmlHelp)
diff --git a/src/sdk/filemanager.cpp b/src/sdk/filemanager.cpp
index 85579b5..f9df312 100644
--- a/src/sdk/filemanager.cpp
+++ b/src/sdk/filemanager.cpp
@@ -185,7 +185,7 @@ namespace platform
inline bool move(wxString const& old_name, wxString const& new_name)
{
// hopefully I got the unintellegible conversion stuff correct... at least it seems to work...
- return ::MoveFileEx(wxFNCONV(old_name), wxFNCONV(new_name), MOVEFILE_REPLACE_EXISTING);
+ return ::MoveFileEx(std::wstring(old_name).c_str(), std::wstring(new_name).c_str(), MOVEFILE_REPLACE_EXISTING);
}
#else
inline bool move(wxString const& old_name, wxString const& new_name)
I built it and CB ran and exited without error or warning no other testing done on the binary.
Tim S.