LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-09-2004, 03:42 AM   #1
Mitsuhashi
LQ Newbie
 
Registered: Jul 2003
Distribution: kubuntu dapper (kernel 2.6.15) with XGL
Posts: 16

Rep: Reputation: 0
Cannot compile a wx application created with KDevelop 3 wizard


Excuse me if this isn't the right forum.

I'm trying to learn to program under linux and I've installed KDevelop 3.0 and the wxWidgets in order to try to make my first app.
With the KDevelop wizard (Project -> New Project) I've selected a C++ project with wxWindows and I've selected the "Simple Hello wxWindows Applications" to start.
KDevelop has created the project files.

With NO MODIFY I press the compile button. KDevelop generate the configuration and makefile with no errors but when it start to compile I get the following:

---------------------------------------------------------------------------------------------------------------
Making all in src
make[1]: Entering directory `/home/maurizio/develop/mywxapp/src'
c++ -DPACKAGE=\"mywxapp\" -DVERSION=\"0.1\" -DHAVE_DLFCN_H=1 -I. -I. -Wall -g -fexceptions -I/usr/lib/wx/include/base-2.4 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Wall -g -fexceptions -Wall -g -fexceptions -I/usr/lib/wx/include/base-2.4 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -c mywxapp.cpp
In file included from mywxapp.cpp:22:
mywxapp.h:39: error: base class `wxFrame' has incomplete type
mywxapp.h:41: error: syntax error before `&' token
mywxapp.h:42: error: `wxCommandEvent' was not declared in this scope
mywxapp.h:42: error: `event' was not declared in this scope
mywxapp.h:42: error: invalid data member initialization
mywxapp.h:42: error: (use `=' to initialize static data members)
mywxapp.h:42: error: variable or field `OnQuit' declared void
mywxapp.h:43: error: `wxCommandEvent' was not declared in this scope
mywxapp.h:43: error: `event' was not declared in this scope
mywxapp.h:43: error: invalid data member initialization
mywxapp.h:43: error: variable or field `OnAbout' declared void
mywxapp.cpp:24: error: incomplete type `wxFrame' does not have member `sm_eventTable'
mywxapp.cpp:25: error: `wxCommandEventFunction' was not declared in this scope
mywxapp.cpp:26: error: `wxCommandEventFunction' was not declared in this scope
mywxapp.cpp: In function `wxApp* wxCreateApp()':
mywxapp.cpp:29: error: cannot allocate an object of type `myWxAppapp'
mywxapp.cpp:29: error: because the following virtual functions are abstract:
mywxapp.h:34: error: virtual bool myWxAppapp::OnInit()
/usr/include/wx/app.h:131: error: virtual int wxAppBase::OnRun()
mywxapp.cpp: In member function `virtual bool myWxAppapp::OnInit()':
mywxapp.cpp:35: error: invalid use of undefined type `struct wxPoint'
/usr/include/wx/utils.h:46: error: forward declaration of `struct wxPoint'
mywxapp.cpp:35: error: `wxSize' undeclared (first use this function)
mywxapp.cpp:35: error: (Each undeclared identifier is reported only once for each function it appears in.)
mywxapp.cpp:37: error: `Show' undeclared (first use this function)
mywxapp.cpp:38: error: `SetTopWindow' undeclared (first use this function)
mywxapp.cpp: At global scope:
mywxapp.cpp:42: error: syntax error before `&' token
mywxapp.cpp:47: error: syntax error before `->' token
mywxapp.cpp:48: error: syntax error before `->' token
mywxapp.cpp:49: error: syntax error before `->' token
mywxapp.cpp:51: error: syntax error before `*' token
mywxapp.cpp:52: error: syntax error before `->' token
mywxapp.cpp:54: error: `menuBar' was not declared in this scope
mywxapp.cpp:54: error: ISO C++ forbids declaration of `SetMenuBar' with no type
mywxapp.cpp:54: error: `int myWxAppFrame::SetMenuBar' is not a static member of `class myWxAppFrame'
mywxapp.cpp:56: error: ISO C++ forbids declaration of `CreateStatusBar' with no type
mywxapp.cpp:57: error: ISO C++ forbids declaration of `SetStatusText' with no type
mywxapp.cpp:57: error: `int myWxAppFrame::SetStatusText' is not a static member of `class myWxAppFrame'
mywxapp.cpp:57: error: invalid conversion from `const char*' to `int'
mywxapp.cpp:58: error: syntax error before `}' token
mywxapp.cpp:61: error: `wxCommandEvent' was not declared in this scope
mywxapp.cpp:61: error: syntax error before `)' token
mywxapp.cpp:62: error: no `void myWxAppFrame::OnQuit(...)' member function declared in class `myWxAppFrame'
mywxapp.cpp:62: error: declaration of `void myWxAppFrame::OnQuit(...)'
mywxapp.h:42: error: conflicts with previous declaration `int myWxAppFrame::OnQuit'
mywxapp.cpp: In member function `void myWxAppFrame::OnQuit(...)':
mywxapp.cpp:63: error: `Close' undeclared (first use this function)
mywxapp.cpp: At global scope:
mywxapp.cpp:67: error: `wxCommandEvent' was not declared in this scope
mywxapp.cpp:67: error: syntax error before `)' token
mywxapp.cpp:68: error: no `void myWxAppFrame::OnAbout(...)' member function declared in class `myWxAppFrame'
mywxapp.cpp:68: error: declaration of `void myWxAppFrame::OnAbout(...)'
mywxapp.h:43: error: conflicts with previous declaration `int myWxAppFrame::OnAbout'
mywxapp.cpp: In member function `void myWxAppFrame::OnAbout(...)':
mywxapp.cpp:70: error: `wxMessageBox' undeclared (first use this function)
make[1]: *** [mywxapp.o] Error 1
make[1]: Leaving directory `/home/maurizio/develop/mywxapp/src'
make: *** [all-recursive] Error 1
---------------------------------------------------------------------------------------------------------------

Can some1 help me please?


Thanks
 
Old 06-09-2004, 06:55 AM   #2
melinda_sayang
Member
 
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Rep: Reputation: 31
You must install wxWidgets library first. Go get it from its official website.
 
Old 06-09-2004, 07:13 AM   #3
Mitsuhashi
LQ Newbie
 
Registered: Jul 2003
Distribution: kubuntu dapper (kernel 2.6.15) with XGL
Posts: 16

Original Poster
Rep: Reputation: 0
I've already installed ALL wxWidgets library!!!

wxBase
wxBase-devel
wxGTK
wxGTK-devel

and the wxGTK-GL too


I'v downloaded a software in source form
 
Old 06-09-2004, 08:43 AM   #4
Mitsuhashi
LQ Newbie
 
Registered: Jul 2003
Distribution: kubuntu dapper (kernel 2.6.15) with XGL
Posts: 16

Original Poster
Rep: Reputation: 0
I'll give you some additional info on how this error is appeared.

Some days ago I've downloaded an app that use the wxWidgets and I've configure / make / install it without problems.
I've tryed to make an app wind KDevelop 3 with wxWidgets and it works.

After that probably I've made something that had change some config because the new Project with KDevelop won't work... and now, I've tryed to rebuild that application but it give me error on wx.

the configure procedure works but it can't make...
 
Old 06-10-2004, 03:36 AM   #5
Mitsuhashi
LQ Newbie
 
Registered: Jul 2003
Distribution: kubuntu dapper (kernel 2.6.15) with XGL
Posts: 16

Original Poster
Rep: Reputation: 0
The problem seem to be in the wxGTK configuration because every programI try to build give me an error on a type defined in the wx/GTK headers.
Seem that compiler won't (or can't) open that headers...

I've tryed to reinstall several times my wx library but with no result...

Someone have any Idea?
 
Old 06-10-2004, 04:12 AM   #6
Mitsuhashi
LQ Newbie
 
Registered: Jul 2003
Distribution: kubuntu dapper (kernel 2.6.15) with XGL
Posts: 16

Original Poster
Rep: Reputation: 0
I've got it... now works!!!

I don't know why but when I install or update any wx package the wx-config in /usr/bin is linked to wxbase-2.4-config when it could be linked to wxgtk-2.4-config.
 
Old 06-10-2004, 06:23 AM   #7
melinda_sayang
Member
 
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Rep: Reputation: 31
That's great. I am happy for you. Good luck......
Sorry for being unresponsive......
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a wizard like application Diederick Programming 1 07-07-2005 01:58 AM
Java/KDE Application Framework Problem in KDevelop 3.0 corpus_delicti Linux - Software 1 08-29-2004 01:53 PM
I cannot compile my souce code created by Glade on redhat9 msramachandran Programming 0 06-02-2004 03:13 AM
enable separate terminal for application i/o in KDevelop mrosati Linux - Software 0 04-21-2004 10:56 AM
Cannot see Open GL project in KDevelop project wizard SparceMatrix Programming 2 08-08-2002 12:14 AM


All times are GMT -5. The time now is 10:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration