Author Topic: C::B and contrib libs  (Read 6084 times)

yesidh

  • Guest
C::B and contrib libs
« on: December 24, 2006, 06:10:00 pm »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
Re: C::B and contrib libs
« Reply #1 on: December 24, 2006, 07:34:25 pm »
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
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

yesidh

  • Guest
Re: C::B and contrib libs
« Reply #2 on: January 10, 2007, 10:53:06 pm »
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

 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
Re: C::B and contrib libs
« Reply #3 on: January 10, 2007, 11:00:26 pm »
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

« Last Edit: January 10, 2007, 11:38:28 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

yesidh

  • Guest
Re: C::B and contrib libs
« Reply #4 on: January 11, 2007, 02:03:42 am »
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

I see that the files are from the actual installation wxWidgets 2.8.0. Thanks.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
Re: C::B and contrib libs
« Reply #5 on: January 11, 2007, 02:28:03 am »
I'm using the 3374 SVN in a Ubuntu Dapper machine. gcc version 4.1.2

You have to apply alot of patches to get SVN 3374 to work with wxWidgets 2.8.
I just noticed that you are before when they applied most of my and afb patches.

I would get the newest SVN and try again.

The only thing needing patched is wxSmith in the current SVN number or in yesterday SVN number.

NOTE: Code::Blocks does NOT support running Code::Blocks linked against wxWidgets 2.8.0 at this time.
But, I have NOT noticed any more problems using 2.8 than I had with 2.6, but I don't use a lot of the plugins. So, use with caution.

Here's my thread on getting 2.8 to work
http://forums.codeblocks.org/index.php?topic=4495.0

Tim S
« Last Edit: January 11, 2007, 02:41:59 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org