problem in compiling wxwidgets in codelite.. help please...

General questions regarding the usage of CodeLite
python.noob
CodeLite Curious
Posts: 7
Joined: Mon Nov 09, 2009 9:03 pm
Genuine User: Yes
IDE Question: c++
Contact:

problem in compiling wxwidgets in codelite.. help please...

Post by python.noob »

Hai geeks,

Thank you all for providing me the opportunity to become a member of this forum. Count me as a new developer of wxwidgets. I'm using mandriva 2009 spring. I searched the mandriva repository for wxwidgets and codelite RPM files and could not find any. So i downloaded a tarball file and installed it successfully(using ./configure make and make install). I can run the programs in the console without any error using `wx-config --libs` commands.

But when i installed codelite when i run it for the first time a dialog box appeared and said

Code: Select all

CodeLite detected that there is no external symbols database attached,
nor it can not find any. Would you like to create one?
(attaching external symbols database improves CodeCompletion significantly)
Then i created new workspace and new project and from helloworld_frame.cpp the following error occurs

Code: Select all

---------Build Started--------
"make"  -j 2 -f "hellowork_wsp.mk"
----------Building project:[ helloworld - Debug ]----------
  Warning: No config found to match: /usr/lib/wx/config/multiarch-i386-linux/gtk2-ansi-release-2.8 --cxxflags --unicode=yes --debug=yes
           in /usr/lib/wx/config
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.
  *** Error: Unrecognised option: '--rcflags'
Use wx-config --help for information on command line options.
g++ -c  "/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp" -g  -D__WX__  -o ./Debug/helloworld_app.o "-I." 
  Warning: No config found to match: /usr/lib/wx/config/multiarch-i386-linux/gtk2-ansi-release-2.8 --debug=yes --libs --unicode=yes
g++ -c  "/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp" -g  -D__WX__  -o ./Debug/helloworld_frame.o "-I." 
           in /usr/lib/wx/config
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:4:22: error: wx/frame.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:2:24: error: wx/toolbar.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:3:25: error: wx/statusbr.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:4:22: error: wx/sizer.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:5:33: error: wx/menu.h: No such file or directory
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:6: error: expected class-name before ‘{’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:13: error: expected `)' before ‘*’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:21: error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:23: error: expected ‘;’ before ‘void’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:24: error: ‘wxCommandEvent’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:7: error: ‘wxFrame’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:8: error: expected constructor, destructor, or type conversion before ‘EVT_CLOSE’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp: In member function ‘void HelloworldFrame::Initialize()’:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: ‘wxBoxSizer’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: ‘sz’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: expected type-specifier before ‘wxBoxSizer’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: expected `;' before ‘wxBoxSizer’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:31: error: ‘SetSizer’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: ‘wxStatusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: ‘statusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: expected type-specifier before ‘wxStatusBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: expected `;' before ‘wxStatusBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:36: error: ‘SetStatusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:37: error: ‘GetStatusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:37: error: ‘wxT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp: At global scope:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:45: error: variable or field ‘OnClose’ declared void
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:45: error: ‘wxCloseEvent’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:45: error: ‘e’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:50: error: variable or field ‘OnQuit’ declared void
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:50: error: ‘wxCommandEvent’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:50: error: ‘e’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp: In member function ‘void HelloworldFrame::CreateMenuBar()’:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: ‘wxMenuBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: ‘mb’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: expected type-specifier before ‘wxMenuBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: expected `;' before ‘wxMenuBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: ‘wxMenu’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: ‘menu’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: expected type-specifier before ‘wxMenu’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: expected `;' before ‘wxMenu’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:61: error: ‘wxID_EXIT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:62: error: ‘wxT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:63: error: ‘SetMenuBar’ was not declared in this scope
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.h:4:20: error: wx/app.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:2:22: error: wx/image.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:3:23: error: wx/sysopt.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:4:27: error: wx/xrc/xmlres.h: No such file or directory
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:5:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:4:22: error: wx/frame.h: No such file or directory
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.h:6: error: expected class-name before ‘{’ token
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:5:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:6: error: expected class-name before ‘{’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:13: error: expected `)' before ‘*’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:21: error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:23: error: expected ‘;’ before ‘void’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:24: error: ‘wxCommandEvent’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:9: error: expected constructor, destructor, or type conversion before ‘HelloworldApp’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp: In member function ‘virtual bool HelloworldApp::OnInit()’:
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:20: error: ‘wxSystemOptions’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:20: error: ‘_T’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:21: error: ‘wxXmlResource’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:22: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:22: error: expected type-specifier before ‘wxPNGHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:22: error: expected `)' before ‘wxPNGHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:23: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:23: error: expected type-specifier before ‘wxCURHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:23: error: expected `)' before ‘wxCURHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:24: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:24: error: expected type-specifier before ‘wxICOHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:24: error: expected `)' before ‘wxICOHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:25: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:25: error: expected type-specifier before ‘wxXPMHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:25: error: expected `)' before ‘wxXPMHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:26: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:26: error: expected type-specifier before ‘wxGIFHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:26: error: expected `)' before ‘wxGIFHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:28: error: ‘wxFrame’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:28: error: ‘frame’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:28: error: ‘NULL’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:29: error: ‘wxID_ANY’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:30: error: ‘wxT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:31: error: ‘wxDefaultPosition’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:32: error: ‘wxSize’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:32: error: new initializer expression list treated as compound expression
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:36: error: ‘TRUE’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:37: error: ‘SetTopWindow’ was not declared in this scope
make[1]: *** [Debug/helloworld_app.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Debug/helloworld_frame.o] Error 1
make: *** [All] Error 2
----------Build Ended----------
87 errors, 0 warnings[code]
This is the kind of error that happened to me when i tried to compile wxwidgets program using normal g++ -c hello.cpp without any `wx-config` kind of flags. so i thing the compiler could not find the libraries. So i'm looking forward to you for help.. Thanks..

P.S: I've installed wxwidgets and codelite in it's own folder means without giving any --prefix options in ./configure.
DavidGH
CodeLite Plugin
Posts: 706
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: problem in compiling wxwidgets in codelite.. help please...

Post by DavidGH »

Hi,

Just for the record, my reply to your identical wxForum post is at http://wxforum.shadonet.com/viewtopic.p ... 082#111576

Regards,

David
User avatar
eranif
CodeLite Plugin
Posts: 6146
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: problem in compiling wxwidgets in codelite.. help please...

Post by eranif »

Right click on your project, and select 'Settings'
Next, switch to the 'Resources' tab, and tick the checkbox that says: 'Resource Compiler is not needed'

Build your project again and it should work

Eran
Make sure you have read the HOW TO POST thread
python.noob
CodeLite Curious
Posts: 7
Joined: Mon Nov 09, 2009 9:03 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: problem in compiling wxwidgets in codelite.. help please...

Post by python.noob »

Thanks David for your reply. But i've searched for wx-config through

Code: Select all

[jebag@jebagnanadasa ~]$ whereis wx-config
wx-config: /usr/bin/wx-config /usr/local/bin/wx-config
So i tried giving /usr/bin/wx-config in the compiler settings
Image
After this when i tried to build the project the error was the same

Code: Select all

----------Build Started--------
"make"  -j 2 -f "hellowork_wsp.mk"
----------Building project:[ helloworld - Debug ]----------
  Warning: No config found to match: /usr/lib/wx/config/multiarch-i386-linux/gtk2-ansi-release-2.8 --cxxflags --unicode=yes --debug=yes
           in /usr/lib/wx/config
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.
  *** Error: Unrecognised option: '--rcflags'
Use wx-config --help for information on command line options.
g++ -c  "/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp" -g  -D__WX__  -o ./Debug/helloworld_app.o "-I." 
  Warning: No config found to match: /usr/lib/wx/config/multiarch-i386-linux/gtk2-ansi-release-2.8 --debug=yes --libs --unicode=yes
g++ -c  "/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp" -g  -D__WX__  -o ./Debug/helloworld_frame.o "-I." 
           in /usr/lib/wx/config
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:4:22: error: wx/frame.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:2:24: error: wx/toolbar.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:3:25: error: wx/statusbr.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:4:22: error: wx/sizer.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:5:33: error: wx/menu.h: No such file or directory
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:6: error: expected class-name before ‘{’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:13: error: expected `)' before ‘*’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:21: error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:23: error: expected ‘;’ before ‘void’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:24: error: ‘wxCommandEvent’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:7: error: ‘wxFrame’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:8: error: expected constructor, destructor, or type conversion before ‘EVT_CLOSE’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp: In member function ‘void HelloworldFrame::Initialize()’:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: ‘wxBoxSizer’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: ‘sz’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: expected type-specifier before ‘wxBoxSizer’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: expected `;' before ‘wxBoxSizer’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:31: error: ‘SetSizer’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: ‘wxStatusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: ‘statusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: expected type-specifier before ‘wxStatusBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: expected `;' before ‘wxStatusBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:36: error: ‘SetStatusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:37: error: ‘GetStatusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:37: error: ‘wxT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp: At global scope:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:45: error: variable or field ‘OnClose’ declared void
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:45: error: ‘wxCloseEvent’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:45: error: ‘e’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:50: error: variable or field ‘OnQuit’ declared void
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:50: error: ‘wxCommandEvent’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:50: error: ‘e’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp: In member function ‘void HelloworldFrame::CreateMenuBar()’:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: ‘wxMenuBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: ‘mb’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: expected type-specifier before ‘wxMenuBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: expected `;' before ‘wxMenuBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: ‘wxMenu’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: ‘menu’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: expected type-specifier before ‘wxMenu’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: expected `;' before ‘wxMenu’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:61: error: ‘wxID_EXIT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:62: error: ‘wxT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:63: error: ‘SetMenuBar’ was not declared in this scope
make[1]: *** [Debug/helloworld_frame.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.h:4:20: error: wx/app.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:2:22: error: wx/image.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:3:23: error: wx/sysopt.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:4:27: error: wx/xrc/xmlres.h: No such file or directory
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:5:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:4:22: error: wx/frame.h: No such file or directory
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.h:6: error: expected class-name before ‘{’ token
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:5:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:6: error: expected class-name before ‘{’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:13: error: expected `)' before ‘*’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:21: error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:23: error: expected ‘;’ before ‘void’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:24: error: ‘wxCommandEvent’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:9: error: expected constructor, destructor, or type conversion before ‘HelloworldApp’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp: In member function ‘virtual bool HelloworldApp::OnInit()’:
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:20: error: ‘wxSystemOptions’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:20: error: ‘_T’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:21: error: ‘wxXmlResource’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:22: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:22: error: expected type-specifier before ‘wxPNGHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:22: error: expected `)' before ‘wxPNGHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:23: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:23: error: expected type-specifier before ‘wxCURHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:23: error: expected `)' before ‘wxCURHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:24: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:24: error: expected type-specifier before ‘wxICOHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:24: error: expected `)' before ‘wxICOHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:25: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:25: error: expected type-specifier before ‘wxXPMHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:25: error: expected `)' before ‘wxXPMHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:26: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:26: error: expected type-specifier before ‘wxGIFHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:26: error: expected `)' before ‘wxGIFHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:28: error: ‘wxFrame’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:28: error: ‘frame’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:28: error: ‘NULL’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:29: error: ‘wxID_ANY’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:30: error: ‘wxT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:31: error: ‘wxDefaultPosition’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:32: error: ‘wxSize’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:32: error: new initializer expression list treated as compound expression
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:36: error: ‘TRUE’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:37: error: ‘SetTopWindow’ was not declared in this scope
make[1]: *** [Debug/helloworld_app.o] Error 1
make: *** [All] Error 2
----------Build Ended----------
87 errors, 0 warnings
Then i tried giving /usr/local/bin/wx-config in the compiler settings and now

Code: Select all

----------Build Started--------
"make"  -j 2 -f "hellowork_wsp.mk"
----------Building project:[ helloworld - Debug ]----------
          Warning: No config found to match: /usr/local/bin/wx-config --cxxflags --unicode=yes --debug=yes
                   in /usr/local/lib/wx/config
          If you require this configuration, please install the desired
          library build.  If this is part of an automated configuration
          test and no other errors occur, you may safely ignore it.
          You may use wx-config --list to see all configs available in
          the default prefix.
  *** Error: Unrecognised option: '--rcflags'
Use wx-config --help for information on command line options.
  Warning: No config found to match: /usr/lib/wx/config/multiarch-i386-linux/gtk2-ansi-release-2.8 --debug=yes --libs --unicode=yes
g++ -c  "/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp" -g  -D__WX__  -o ./Debug/helloworld_app.o "-I." 
           in /usr/lib/wx/config
g++ -c  "/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp" -g  -D__WX__  -o ./Debug/helloworld_frame.o "-I." 
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.h:4:20: error: wx/app.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:2:22: error: wx/image.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:3:23: error: wx/sysopt.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:4:27: error: wx/xrc/xmlres.h: No such file or directory
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:5:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:4:22: error: wx/frame.h: No such file or directory
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.h:6: error: expected class-name before ‘{’ token
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:5:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:6: error: expected class-name before ‘{’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:13: error: expected `)' before ‘*’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:21: error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:23: error: expected ‘;’ before ‘void’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:24: error: ‘wxCommandEvent’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:9: error: expected constructor, destructor, or type conversion before ‘HelloworldApp’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp: In member function ‘virtual bool HelloworldApp::OnInit()’:
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:20: error: ‘wxSystemOptions’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:20: error: ‘_T’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:21: error: ‘wxXmlResource’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:22: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:22: error: expected type-specifier before ‘wxPNGHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:22: error: expected `)' before ‘wxPNGHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:23: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:23: error: expected type-specifier before ‘wxCURHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:23: error: expected `)' before ‘wxCURHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:24: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:24: error: expected type-specifier before ‘wxICOHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:24: error: expected `)' before ‘wxICOHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:25: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:25: error: expected type-specifier before ‘wxXPMHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:25: error: expected `)' before ‘wxXPMHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:26: error: ‘wxImage’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:26: error: expected type-specifier before ‘wxGIFHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:26: error: expected `)' before ‘wxGIFHandler’
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:28: error: ‘wxFrame’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:28: error: ‘frame’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:28: error: ‘NULL’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:29: error: ‘wxID_ANY’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:30: error: ‘wxT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:31: error: ‘wxDefaultPosition’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:32: error: ‘wxSize’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:32: error: new initializer expression list treated as compound expression
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:36: error: ‘TRUE’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:37: error: ‘SetTopWindow’ was not declared in this scope
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:4:22: error: wx/frame.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:2:24: error: wx/toolbar.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:3:25: error: wx/statusbr.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:4:22: error: wx/sizer.h: No such file or directory
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:5:33: error: wx/menu.h: No such file or directory
In file included from /home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:1:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:6: error: expected class-name before ‘{’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:13: error: expected `)' before ‘*’ token
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:21: error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:23: error: expected ‘;’ before ‘void’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.h:24: error: ‘wxCommandEvent’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:7: error: ‘wxFrame’ has not been declared
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:8: error: expected constructor, destructor, or type conversion before ‘EVT_CLOSE’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp: In member function ‘void HelloworldFrame::Initialize()’:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: ‘wxBoxSizer’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: ‘sz’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: expected type-specifier before ‘wxBoxSizer’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: error: expected `;' before ‘wxBoxSizer’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:31: error: ‘SetSizer’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: ‘wxStatusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: ‘statusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: expected type-specifier before ‘wxStatusBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:34: error: expected `;' before ‘wxStatusBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:36: error: ‘SetStatusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:37: error: ‘GetStatusBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:37: error: ‘wxT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp: At global scope:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:45: error: variable or field ‘OnClose’ declared void
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:45: error: ‘wxCloseEvent’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:45: error: ‘e’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:50: error: variable or field ‘OnQuit’ declared void
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:50: error: ‘wxCommandEvent’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:50: error: ‘e’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp: In member function ‘void HelloworldFrame::CreateMenuBar()’:
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: ‘wxMenuBar’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: ‘mb’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: expected type-specifier before ‘wxMenuBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:58: error: expected `;' before ‘wxMenuBar’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: ‘wxMenu’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: ‘menu’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: expected type-specifier before ‘wxMenu’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:60: error: expected `;' before ‘wxMenu’
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:61: error: ‘wxID_EXIT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:62: error: ‘wxT’ was not declared in this scope
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:63: error: ‘SetMenuBar’ was not declared in this scope
make[1]: *** [Debug/helloworld_app.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Debug/helloworld_frame.o] Error 1
make: *** [All] Error 2
----------Build Ended----------
87 errors, 0 warnings
Meanwhile i found that wx-config.in was found in /home/jebag/wxWidgets-2.9.0. So please help me. Sorry i'm totally new to linux. In ur video tutorial as well as in the tutorial in the web page you haven't specified how to install in linux versions(and locating the wx-config and library etc., if it's not installed in the default path using --prefix options). So please make me clear..

For eran thanks for ur reply. But nothing worked.
DavidGH
CodeLite Plugin
Posts: 706
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: problem in compiling wxwidgets in codelite.. help please...

Post by DavidGH »

Thanks David for your reply. But i've searched for wx-config through 'whereis wx-config'
That will only find things in your PATH. I understood you to say that you'd downloaded a wxWidgets tarball and built it yourself. If so, it's the path to that version of wxWidgets that you need.
Meanwhile i found that wx-config.in was found in /home/jebag/wxWidgets-2.9.0
So that's presumably where you built wxWidgets. However you can't use wx-config.in: that generates the real wx-config when you built wxWidgets. Exactly where wx-config is located depends on what you did then: if you built in in a subdirectory (for example: mkdir build-dir; cd build-dir; ../configure --prefix=$(pwd) --enable-debug --enable-unicode) then wx-config is in /home/jebag/wxWidgets-2.9.0/build-dir. If you did the default ./configure; make; su; make install then it's in /usr/local/bin (but see below).

Did you build wxWidgets with the --enable-debug flag? If not, you don't have a debug build, so wx-config won't find one. You will need to change your settings to:
/usr/local/bin/wx-config --cxxflags --unicode=yes --debug=no
or similar. Or, rebuild wx with the --enable-debug flag.

The wx-config script is a wonderful thing. It will tell you exactly what it can supply if you ask it e.g. wx-config --list. Do wx-config --help to see what it can do.
python.noob
CodeLite Curious
Posts: 7
Joined: Mon Nov 09, 2009 9:03 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: problem in compiling wxwidgets in codelite.. help please...

Post by python.noob »

Thank you once again david.. I've not created a separate directory called buid-dir.. To give you a vivid description what i did was this

Code: Select all

$tar xzvf wxWidgets-2.9.0.tar.gz 
$cd wxWidgets-2.9.0
$./configure
$make
$su
password:(typed password)
$make install
I think i've explained myself clearly. I've not given any options or debug or anything.. The "same thing" i did with codelite tarball too..
Now as you suggested i've changed the compiler options to
/usr/local/bin/wx-config --cxxflags --unicode=yes --debug=no
when i compiled helloworld_frame.cpp the error

Code: Select all

----------Build Started--------
"make"  -j 2 -f "hellowork_wsp.mk"
----------Building project:[ helloworld - Debug ]----------
 wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--release] [--version-full]
           [--list] [--selected-config] [--host=HOST] [--toolkit=TOOLKIT]
           [--universal[=yes|no]] [--unicode[=yes|no]] [--debug[=yes|no]]
           [--static[=yes|no]] [--version[=VERSION]] [--basename]
           [--cc] [--cxx] [--cppflags [base]] [--cxxflags [base]] [--cflags]
           [--rescomp] [--linkdeps] [--ld] [--utility=UTIL]
           [--libs [LIBS...]] [--optional-libs [LIBS...]]
g++ -o ./Debug/helloworld ./Debug/helloworld_app.o ./Debug/helloworld_frame.o  "-L."   -O2 -L/usr/local/lib -pthread   -lwx_gtk2u_xrc-2.9 -lwx_gtk2u_html-2.9 -lwx_gtk2u_qa-2.9 -lwx_gtk2u_adv-2.9 -lwx_gtk2u_core-2.9 -lwx_baseu_xml-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9  
    wx-config returns information about the wxWidgets libraries available on
  your system.  It may be used to retrieve the information required to build
  applications using these libraries using --cppflags, --cxxflags, --cflags,
  and --libs options.
    If multiple builds of wxWidgets  are available,  you can use the options
  --prefix, --host, --toolkit, --unicode, --debug, --static, --universal and
  --version to select from them. The --selected-config option shows the name
  of the current configuration and --list shows available alternatives which
  match specified criteria. The --utility option returns the correct version
  of UTIL to use with the selected build. The --linkdeps option returns only
  static libraries for your makefile link rule dependencies.
    The LIBS arguments (comma or space separated) may be used to specify the
  wxWidgets libraries that  you wish to use. The "std" label may be used  to
  import all libraries that would be used by default if none were  specified
  explicitly, e.g. wx-config --libs core,base. The "all" label may  be  used
  to  import  all libraries that have been compiled which are shown  in  the
  list  below.  The  --optional-libs parameter should be followed by  a list
  of  libs that should be linked to, but only if they are available.
  Available libraries in this build are:
  xrc stc richtext propgrid aui gl html qa adv core xml net base
./Debug/helloworld_app.o: In function `wxCreateApp()':
/home/jebag/.codelite/hellowork/helloworld/helloworld_app.cpp:7: undefined reference to `wxAppConsole::CheckBuildOptions(char const*, char const*)'
./Debug/helloworld_app.o: In function `wxAppConsole::SetInitializerFunction(wxAppConsole* (*)())':
/usr/include/wx-2.8/wx/app.h:279: undefined reference to `wxAppConsole::ms_appInitFn'
./Debug/helloworld_app.o: In function `wxAppConsole::GetInstance()':
/usr/include/wx-2.8/wx/app.h:287: undefined reference to `wxAppConsole::ms_appInstance'
./Debug/helloworld_app.o: In function `wxString::operator=(char const*)':
/usr/include/wx-2.8/wx/string.h:965: undefined reference to `wxStringBase::operator=(char const*)'
./Debug/helloworld_app.o: In function `wxStringBase':
/usr/include/wx-2.8/wx/string.h:368: undefined reference to `wxStringBase::npos'
/usr/include/wx-2.8/wx/string.h:368: undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x28): undefined reference to `wxEvtHandler::TryParent(wxEvent&)'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x2c): undefined reference to `wxApp::GetEventTable() const'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x30): undefined reference to `wxApp::GetEventHashTable() const'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x44): undefined reference to `wxApp::Initialize(int&, char**)'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x64): undefined reference to `wxAppBase::Exit()'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x70): undefined reference to `wxAppConsole::OnCmdLineHelp(wxCmdLineParser&)'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x74): undefined reference to `wxAppConsole::OnCmdLineError(wxCmdLineParser&)'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x78): undefined reference to `wxAppConsole::FilterEvent(wxEvent&)'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x7c): undefined reference to `wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x84): undefined reference to `wxAppConsole::ProcessPendingEvents()'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x88): undefined reference to `wxApp::Yield(bool)'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x94): undefined reference to `wxAppBase::MainLoop()'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x98): undefined reference to `wxAppBase::ExitMainLoop()'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0x9c): undefined reference to `wxAppBase::Pending()'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0xa0): undefined reference to `wxAppBase::Dispatch()'
./Debug/helloworld_app.o:(.rodata._ZTV13HelloworldApp[vtable for HelloworldApp]+0xac): undefined reference to `wxAppBase::OnExceptionInMainLoop()'
/usr/bin/ld: Dwarf Error: Offset (54896) greater than or equal to .debug_str size (18491).
./Debug/helloworld_frame.o: In function `HelloworldFrame::Initialize()':
/home/jebag/.codelite/hellowork/helloworld/helloworld_frame.cpp:30: undefined reference to `wxBoxSizer::wxBoxSizer(int)'
./Debug/helloworld_frame.o: In function `wxString::operator=(wxString const&)':
/usr/include/wx-2.8/wx/string.h:660: undefined reference to `wxStringBase::operator=(wxStringBase const&)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x24): undefined reference to `wxWindowBase::TryValidator(wxEvent&)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x28): undefined reference to `wxWindowBase::TryParent(wxEvent&)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0xa8): undefined reference to `wxWindow::Enable(bool)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0xdc): undefined reference to `wxWindow::AcceptsFocus() const'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0xe4): undefined reference to `wxWindowBase::Navigate(int)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x1f0): undefined reference to `wxWindow::DoMoveInTabOrder(wxWindow*, wxWindowBase::MoveKind)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x230): undefined reference to `wxFrame::DoSetClientSize(int, int)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x264): undefined reference to `wxWindow::ApplyToolTip(_GtkTooltips*, char const*)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x274): undefined reference to `wxWindow::ApplyWidgetStyle(bool)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x294): undefined reference to `wxTopLevelWindowGTK::SetIcon(wxIcon const&)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x2d8): undefined reference to `wxFrame::GtkOnSize()'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x2dc): undefined reference to `wxFrameBase::SendSizeEvent()'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x2e8): undefined reference to `wxFrame::CreateStatusBar(int, long, int, wxString const&)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x300): undefined reference to `wxFrame::CreateToolBar(long, int, wxString const&)'
./Debug/helloworld_frame.o:(.rodata._ZTV15HelloworldFrame[vtable for HelloworldFrame]+0x324): undefined reference to `wxFrame::PositionStatusBar()'
collect2: ld returned 1 exit status
make[1]: *** [Debug/helloworld] Error 1
make: *** [All] Error 2
----------Build Ended----------
8 errors, 0 warnings
Anyway one more question do i need to give this only in compiler options or in linker and resources too.. Anyhow i tried with this two possibilities but the result is the same...

But as said in this post http://forums.wxwidgets.org/viewtopic.p ... highlight= i've given both as no with
-g;$(shell wx-config --cxxflags --unicode=no --debug=no) -> compiler tab
-O2;$(shell wx-config --debug=no --libs --unicode=no); -> linker tab
Resource compiler is not needed -> checked
and when compiling with this settings helloworld_frame.cpp

Code: Select all

----------Build Started--------
"make"  -j 2 -f "hellowork_wsp.mk"
----------Building project:[ helloworld - Debug ]----------
g++ -o ./Debug/helloworld ./Debug/helloworld_app.o ./Debug/helloworld_frame.o  "-L."   -O2 -pthread  -Wl,--as-needed -Wl,-z,relro  -lwx_gtk2_richtext-2.8 -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  
----------Build Ended----------
0 errors, 0 warnings
But when i tried to execute the message was

Code: Select all

Current working directory: /home/jebag/.codelite/hellowork/helloworld/Debug
Running program: xterm -sb -title './helloworld ' -e './helloworld '
Program exited with return code: 255
Can you get any idea out of this?. If rebuilding is the only option left tell me how to do that......
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: problem in compiling wxwidgets in codelite.. help please...

Post by jfouche »

It seems that you have 2 versions of wxWidgets installed : 2.8 (probably download earlier are provided with your distribution) and 2.9 that you just compiled. I don't know linux, but I think you have first to fix this problem (if it is one).

I think that your 'sudo make install' overrided your previous wxWidgets 2.8 headers... but not sure at all.
Jérémie
DavidGH
CodeLite Plugin
Posts: 706
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: problem in compiling wxwidgets in codelite.. help please...

Post by DavidGH »

OK, you have 2 wx builds on your system. The one with the wx-config in /usr/bin is presumably the standard mandriva non-debug non-unicode wxGTK-2.8. That's what you get when you use $(shell wx-config ...). It's not debug, but you've told CodeLite that it is in the Configuration Manager setting, so it's building in ./Debug. That's not a serious problem, it's just confusing.
I don't know why that doesn't run. Try running it in a terminal and seeing what error message it gives.

You also have your self-build wxGTK-2.9, in /usr/local/bin. That is also non-debug, but it is unicode (as 2.9 does that by default). However when you tried to use this:
Now as you suggested i've changed the compiler options to
/usr/local/bin/wx-config --cxxflags --unicode=yes --debug=no
you got a strange output from wx-config. Did you miss out the $(shell...)? That command should be:
$(shell /usr/local/bin/wx-config --cxxflags --unicode=yes --debug=no)
And yes, you need a similar command in the Linker section.
If rebuilding is the only option left tell me how to do that......
I don't know what you want to do. I always build debug apps and debug wx, so that I have a better chance of finding bugs. But if you don't want to (because you don't write bugs ;) ) then that's fine. If you actually want your app to use wxGTK-2.9, which is new and not supplied yet by distros, then do so; but if you want to distribute your app, it would be better to use the currrent standard wxGTK-2.8, in which case use plain 'wx-config' instead of /usr/local/bin/wx-config (and I suggest uninstalling the one in /usr/local to avoid confusion).
python.noob
CodeLite Curious
Posts: 7
Joined: Mon Nov 09, 2009 9:03 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: problem in compiling wxwidgets in codelite.. help please...

Post by python.noob »

Tank you david...i said i've installed codelite with the same procedure.. ./configure,make,make install without specifying anything.. I used to run command line wxwidgets progs. with the following lines..

Code: Select all

g++ -c `wx-config --cxxflags` hello.cpp
g++ -o hello hello.o `wx-config --libs`
./hello
I didn't forget the shell...
It is

Code: Select all

-g;$(shell usr/local/bin/wx-config --cxxflags --unicode=yes --debug=no) -> compiler
-O2;$(shell usr/local/bin/wx-config --debug=no --libs --unicode=yes); ->linker
But while running progs. in commandline i've not specified any path. Just the wx-config did the trick. If so why the problem with this?
All i want is to make the prog. to run. Is there any way like(grep,locate etc.,) to find out that there are two wx builds as said by you...
DavidGH
CodeLite Plugin
Posts: 706
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: problem in compiling wxwidgets in codelite.. help please...

Post by DavidGH »

I didn't forget the shell...
It is
-g;$(shell usr/local/bin/wx-config --cxxflags --unicode=yes --debug=no) -> compiler
-O2;$(shell usr/local/bin/wx-config --debug=no --libs --unicode=yes); ->linker
Those lines omit the initial '/' in the path. It should be
/usr/local/bin/wx-config

If you add this, does helloworld build?
Is there any way like(grep,locate etc.,) to find out that there are two wx builds as said by you...
You could use 'find' or 'locate', or just do 'ls /usr/bin/wx-config' and 'ls /usr/local/bin/wx-config'. But there's no need: we now both know that the installations are there.
Post Reply