wxwidgets and codelite..

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
python.noob
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Nov 09, 2009 1:14 pm
Location: chennai,India

wxwidgets and codelite..

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. [/code]
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart »

Hi,
I'm using mandriva 2009 spring. I searched the mandriva repository for wxwidgets
Try lib64gtku2.8-devel (or without the '64' for i386)
and codelite RPM files and could not find any.
No, CodeLite isn't in mandriva yet. I create unofficial fedora and suse rpms for the CodeLite download page, but there's not been any demand for mandriva ones (yet).
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)
That's correct. One of the plus points of CodeLite is the excellent code-completion. Saying 'yes' to that dialog means that code-completion will work for wxWidgets classes, plus any other headers it searches e.g. stdc.
Then i created new workspace and new project and from helloworld_frame.cpp the following error occurs
//snip
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.
That's fine, I do the same thing. However it does mean that you need to tell other programs where you put them.

In particular you need to tell CodeLite where wx-config is. If you open the 'Settings' of your project (there's a tool for this in the workspace view, or right-click over the project icon in the tree below), you can put the correct path in the Compiler and Linker tabs. At present these say things like:
-g;$(shell wx-config --cxxflags )
Change to:
-g;$(shell /full/path/to/wx-config --cxxflags )

While you're welcome to post here, of course, for pure CodeLite issues there is also the CodeLite forum or the irc channel #codelite

Regards,

David
python.noob
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Nov 09, 2009 1:14 pm
Location: chennai,India

Post by python.noob »

Thanks david.. I've done according to what you've said.. Please visit there and answer my question...
oldjudge
In need of some credit
In need of some credit
Posts: 1
Joined: Mon Oct 20, 2008 11:04 am

Post by oldjudge »

Hi,

you try to use gtk-ansi-release-2.8 build of wixWidgets, but specify --unicode=yes and --debug=yes. This will not work as you can see.

With this wxWidgets build you need to do --unicode=no and --debug=no. Another option is to compile a unicode and debug build of wxWidgets and use this with the mentioned flags for building the app.

Also the --rcflags should not be there, since you are using linux. In codelite you can simpy tell the ide ressource compiling is not needed in the proper config tab.

hth
oldjudge
python.noob
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Nov 09, 2009 1:14 pm
Location: chennai,India

Post by python.noob »

Thank you oldjudge for your reply.. But your trick lead me only to half the way.

Code: Select all

-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
--rcflags removed
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?
Post Reply