User forums > Using Code::Blocks

Weird issue with Code::Blocks on Ubuntu

(1/1)

davidklecker:
I am using Code::Blocks version 10.05 on Ubuntu 12.04. When I compile a program using <wx/webview.h> Code::Blocks says, Fatal error: wx/webview.h No such file or directory. I have set all my global variables and I have set the build options with the proper flags. If I compile the program outside of Code::Blocks using the same flags I defined in Code::Blocks, basically I am running the same compilation, but outside of Code Blocks, it works. I get no error about wx/webview.h. There was a moment when this worked inside CodeBlocks however I didn't change anything. It just worked. Today it reverted back.

Does anyone have an idea what is going on?

Thanks!

BlueHazzard:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

davidklecker:
I am using the GNU GCC compiler that was included right out of the box when you install Code::Blocks. I'm sorry I don't know the exact version number.

The build log is where the solution lies so thank you for showing me how to create that and view it. Here is the log.


--- Code: ---Build started on: 19-04-2016 at 12:13.10
Build ended on: 19-04-2016 at 12:13.10

-------------- Build: Debug in AutoHarp ---------------
g++ -Wall -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -g -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -D__WXDEBUG__ -Wall -c "/home/davidklecker/AutoHarp Suite/trunk/AutoHARP/src/AboutDlg.cpp" -o Debug/src/AboutDlg.o
In file included from /home/davidklecker/AutoHarp Suite/trunk/AutoHARP/src/AboutDlg.cpp:37:0:
/home/davidklecker/AutoHarp Suite/trunk/AutoHARP/src/AboutDlg.h:31:24: fatal error: wx/webview.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings

--- End code ---

The error can be noticed when I show you the results of wx-config --cxxflags


--- Code: ----I/usr/local/lib/wx/include/gtk2-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread

--- End code ---

So obviously I have the wrong libraries being linked in Code::Blocks. So I guess my call to wx-config --cxxflags is returning something different to what it returns from the console. How can I make sure the config call in Code::Blocks is returning the proper and correct information?

Thanks

davidklecker:
I have resolved the problem with some additional help from the wxWidgets community. The problem is with Code::Blocks calling usr/bin/wx-config which links to the 2.8 libraries rather than Code::Blocks calling usr/local/bin which has the 3.0 libraries which is probably how C::B works to begin with. There may be a much better solution to this but my solution was to delete the wx-config program from usr/bin forcing C::B to go to usr/local/bin.

Navigation

[0] Message Index

Go to full version