User forums > Help
Compile Errors when building Code::Blocks source
GameCodingNinja:
I was able to get wxWidgets 2.8.12 to compile by forcing it not to use C++11 or greater. Now Code::Blocks is throwing up an error as if a wxWidgets function call doesn't exist. This is all a moot point because the one app I do use requires wxWidgets 3.0 or greater. I'm unable to compile wxWidgets 3.0.2 due to an ambiguous overload call to abs. I'm able to compile wxWidgets 3.1.0 without a problem.
Any app I try to compile that uses wxWidgets is always a problem. Code::Blocks should move to Qt.
Using the tip of SVN I was able to compile it. It errors on start up but if I ignore it, the "Code Completion" and "Compiler" tool bars are blank. I can probably live without them. Hopefully Code::Blocks works with CMake.
BlueHazzard:
--- Quote ---Any app I try to compile that uses wxWidgets is always a problem. Code::Blocks should move to Qt.
--- End quote ---
Will never gonna happen... Do you know that 90% of the code is wx code?
--- Quote --- Now Code::Blocks is throwing up an error as if a wxWidgets function call doesn't exist.
--- End quote ---
Without the exact error message we are not able to help you...
--- Quote ---I'm unable to compile wxWidgets 3.0.2 due to an ambiguous overload call to abs
--- End quote ---
I don't understand this... What is/are "abs"? Do you mean the function abs() ? Can you give the exact error message?
--- Quote --- It errors on start up but if I ignore it
--- End quote ---
Again, what error message? The most things are fixable, and we are willing to help you, but we need the exact error messages...
--- Quote ---the "Code Completion" and "Compiler" tool bars are blank
--- End quote ---
What does this mean? The symbols are missing? The plugin is not loading? Have you run the update script found in the src folder after compilation?
--- Quote ---The IDE ran but crashed. I'm sure it's related to wxWidgets (3.1.0). I'm going to fall back to 2.8.12.
--- End quote ---
This is probably because of the symbol browser of code completion. This is a known bug. If you disable the symbol browser codeblocks should run fine also with wx3.1
To disable the symbol browser: Settings->Editor->Code completion(or code assistance?)->Symbol browser->disable symbol browser
If it still crash, can you give some backtraces? We all want to make codeblocks run with wx3.0 but without bug reports this is difficult...
Commaster:
--- Quote from: GameCodingNinja on February 11, 2017, 11:17:08 pm ---Any app I try to compile that uses wxWidgets is always a problem. Code::Blocks should move to Qt.
--- End quote ---
After carefully comparing the source code sizes, compilation times and the resulting library sizes of both wx and Qt I came to the conclusion: "No, thanks". Just because you are familiar with a Framework doesn't make it a better one. (Not to mention, that there is some effort in the wxQt branch...)
GameCodingNinja:
--- Quote ---of both wx and Qt I came to the conclusion: "No, thanks".
--- End quote ---
--- Quote ---Do you know that 90% of the code is wx code?
--- End quote ---
My apologies. My suggestion is purely out of frustration with trying to compile wxWidgets which is always a problem. I write games and game engines and don't use any GUI libraries so I have no biases.
--- Quote ---Without the exact error message we are not able to help you...
--- End quote ---
Here is the Code::Blocks error message after I compile wxWidgets 2.8.12. I compile wxWidgets 2.8.12 with export CFLAGS=-std=c99 CXXFLAGS=-std=c++98. Without this, wxWidgets 2.8.12 throws up a bunch of repeating errors. (./src/gtk/bdiag.xbm:6:50: error: narrowing conversion of ‘128’ from ‘int’ to ‘char’ inside { } [-Wnarrowing])
--- Code: ---menuitemsmanager.Tpo -c menuitemsmanager.cpp -fPIC -DPIC -o .libs/menuitemsmanager.o
macrosmanager.cpp: In member function ‘void MacrosManager::Reset()’:
macrosmanager.cpp:93:33: error: ‘wxRE_ADVANCED’ was not declared in this scope
wxRE_ADVANCED);
^~~~~~~~~~~~~
--- End code ---
As I stated in my last post, I need wxWidgets 3.0 or greater for this other app I use. SVN tip of Code::Blocks with wxWidgets 3.1.0 compiles without a problem.
--- Quote ---What is/are "abs"? Do you mean the function abs()
--- End quote ---
Yes. Apparently they were using abs() for floats instead of using fabs(). Here's the error message when trying to compile wxWidgets 3.0.2.
--- Code: ---./src/stc/scintilla/src/Editor.cxx: In function ‘bool Close(Point, Point)’:
./src/stc/scintilla/src/Editor.cxx:5844:23: error: call of overloaded ‘abs(XYPOSITION)’ is ambiguous
if (abs(pt1.x - pt2.x) > 3
--- End code ---
--- Quote ---Again, what error message? The most things are fixable, and we are willing to help you, but we need the exact error messages...
--- End quote ---
Here is the error seen when starting up Code::Blocks for the first time after being compiled with wxWidgets 3.1.0.
This shows the tool bars that are blank which happen to be the "Code Completion" and "Compiler" tool bars.
--- Quote ---If you disable the symbol browser codeblocks should run fine also with wx3.1
--- End quote ---
How do you do this? Where is the symbol browser?
BlueHazzard:
After compilation you have to run the "update30" script in the src subfolder. This script will copy all needed resources (like images) to the right place. I think this is the reason for the missing symbols? I can't find a error in your screenshot... They are all disabled, because no project is loaded?
--- Quote ---Here is the error seen when starting up Code::Blocks for the first time after being compiled with wxWidgets 3.1.0.
--- End quote ---
probably the same as: https://sourceforge.net/p/codeblocks/tickets/387/
@obfuscated:Does this come from the symol browser?
You can disable the symbol browser by Settings->Editor->Code Completion->Symbol browser->Disable symbol browser (this is only from memory, the actual names can alter, but this should give you a hint where to look)
--- Quote ---
--- Code: ---menuitemsmanager.Tpo -c menuitemsmanager.cpp -fPIC -DPIC -o .libs/menuitemsmanager.o
macrosmanager.cpp: In member function ‘void MacrosManager::Reset()’:
macrosmanager.cpp:93:33: error: ‘wxRE_ADVANCED’ was not declared in this scope
wxRE_ADVANCED);
^~~~~~~~~~~~~
--- End code ---
--- Code: ---./src/stc/scintilla/src/Editor.cxx: In function ‘bool Close(Point, Point)’:
./src/stc/scintilla/src/Editor.cxx:5844:23: error: call of overloaded ‘abs(XYPOSITION)’ is ambiguous
if (abs(pt1.x - pt2.x) > 3
--- End code ---
--- End quote ---
both errors come from codeblocks? So wxWidgets compiles fine? Funny, i never saw any errors like this on compiling codeblocks...
what is the command line you compiled wxWidgets with?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version