User forums > Using Code::Blocks
C::B and contrib libs
yesidh:
Hi,
I'm trying to compile a program that use the wxStyledTextCtrl from the contrib folder in the wxWidgets distribution. I did compile using commands lines and a Makefile I adapt, but I having problems compiling with C::B, I link to the library in the options.
I get a lot of error, that do not think it is useful to put it here, for example C::B complains about the wx/stc/stc.h include. Any help will be appreciate.
I'm using the 3374 SVN in a Ubuntu Dapper machine. gcc version 4.1.2
bye.
stahta01:
Turn on compiler logging and post the command that give the errors.
"Settings" -> "Compiler and debugger" Tab "Other" set "Compiler logging" to "Full command line"
Tim S
yesidh:
Hi,
I'm now trying to compile the AUI from the samples folder, the answer I got is the following:
--- Code: ----------------- Build: Debug in AUI ---------------
g++ -Wall `wx-config --cxxflags` `wx-config --libs` -Winvalid-pch -include wx_pch.h -DUSE_PCH -g -c main.cpp -o obj/Debug/main.o
cc1plus: warning: ./wx_pch.h.gch/Debug_wx_pch.h.gch: not used because `_REENTRANT' is defined
main.cpp:38:24: error: wx/aui/aui.h: No existe el fichero ó directorio
main.cpp:113: error: ISO C++ forbids declaration of ‘wxAuiDockArt’ with no type
main.cpp:113: error: expected ‘;’ before ‘*’ token
main.cpp:123: error: ISO C++ forbids declaration of ‘wxAuiNotebook’ with no type
main.cpp:123: error: expected ‘;’ before ‘*’ token
main.cpp:143: error: ‘wxAuiNotebookEvent’ has not been declared
main.cpp:144: error: ‘wxAuiNotebookEvent’ has not been declared
main.cpp:153: error: ‘wxAuiManagerEvent’ has not been declared
main.cpp:157: error: ‘wxAuiManager’ does not name a type
main.cpp:177: error: ‘wxAuiManager’ has not been declared
main.cpp:238: error: ISO C++ forbids declaration of ‘wxAuiManager’ with no type
main.cpp:238: error: expected ‘;’ before ‘*’ token
main.cpp: In constructor ‘wxSizeReportCtrl::wxSizeReportCtrl(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, int*)’:
main.cpp:180: error: ‘m_mgr’ was not declared in this scope
main.cpp: In member function ‘void wxSizeReportCtrl::OnPaint(wxPaintEvent&)’:
main.cpp:205: error: ‘m_mgr’ was not declared in this scope
main.cpp:207: error: ‘wxAuiPaneInfo’ was not declared in this scope
main.cpp:207: error: expected `;' before ‘pi’
main.cpp:209: error: ‘pi’ was not declared in this scope
main.cpp: In constructor ‘SettingsPanel::SettingsPanel(wxWindow*, MyFrame*)’:
main.cpp:406: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:406: error: ‘wxAUI_DOCKART_PANE_BORDER_SIZE’ was not declared in this scope
main.cpp:407: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:407: error: ‘wxAUI_DOCKART_SASH_SIZE’ was not declared in this scope
main.cpp:408: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:408: error: ‘wxAUI_DOCKART_CAPTION_SIZE’ was not declared in this scope
main.cpp: In member function ‘void SettingsPanel::UpdateColors()’:
main.cpp:432: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:432: error: ‘wxAUI_DOCKART_BACKGROUND_COLOUR’ was not declared in this scope
main.cpp:435: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:435: error: ‘wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR’ was not declared in this scope
main.cpp:438: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:438: error: ‘wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR’ was not declared in this scope
main.cpp:441: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:441: error: ‘wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR’ was not declared in this scope
main.cpp:444: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:444: error: ‘wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR’ was not declared in this scope
main.cpp:447: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:447: error: ‘wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR’ was not declared in this scope
main.cpp:450: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:450: error: ‘wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR’ was not declared in this scope
main.cpp:453: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:453: error: ‘wxAUI_DOCKART_SASH_COLOUR’ was not declared in this scope
main.cpp:456: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:456: error: ‘wxAUI_DOCKART_BORDER_COLOUR’ was not declared in this scope
main.cpp:459: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:459: error: ‘wxAUI_DOCKART_GRIPPER_COLOUR’ was not declared in this scope
main.cpp: In member function ‘void SettingsPanel::OnPaneBorderSize(wxSpinEvent&)’:
main.cpp:465: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:465: error: ‘wxAUI_DOCKART_PANE_BORDER_SIZE’ was not declared in this scope
main.cpp: In member function ‘void SettingsPanel::OnSashSize(wxSpinEvent&)’:
main.cpp:472: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:472: error: ‘wxAUI_DOCKART_SASH_SIZE’ was not declared in this scope
main.cpp: In member function ‘void SettingsPanel::OnCaptionSize(wxSpinEvent&)’:
main.cpp:479: error: ‘class MyFrame’ has no member named ‘GetDockArt’
main.cpp:479: error: ‘wxAUI_DOCKART_CAPTION_SIZE’ was not declared in this scope
main.cpp: In member function ‘void SettingsPanel::OnSetColor(wxCommandEvent&)’:
main.cpp:494: error: ‘wxAUI_DOCKART_BACKGROUND_COLOUR’ was not declared in this scope
Process terminated with status 1 (0 minutes, 11 seconds)
50 errors, 1 warnings
--- End code ---
I changed the build options to add the `wx-config --libs` and the `wx-config --cxxflags`, the main error I see is that the compiler doesn't find the wx/aui/aui.h file but I search it and it is in the "/usr/local/include/wx-2.8/wx" directory. Thanks for any help.
stahta01:
On the command line run the following what does it return, I am guessing it will return the libs from an old installation.
Tim S
wx-config --libs
also, do the following on the command line.
wx-config --cxxflags
also, do the following on the command line.
which -a wx-config
yesidh:
The answer to the commands are the following:
--- Code: ---$ wx-config --libs
-L/usr/local/lib -pthread -lwx_gtk2_aui-2.8 -lwx_gtk2_xrc-2.8 -lwx_gtk2_qa-2.8 -lwx_gtk2_html-2.8 -lwx_gtk2_adv-2.8 -lwx_gtk2_core-2.8 -lwx_base_xml-2.8 -lwx_base_net-2.8 -lwx_base-2.8
$ wx-config --cxxflags
-I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread
$ which -a wx-config
/usr/local/bin/wx-config
/usr/bin/wx-config
/usr/bin/X11/wx-config
--- End code ---
I see that the files are from the actual installation wxWidgets 2.8.0. Thanks.
Navigation
[0] Message Index
[#] Next page
Go to full version