Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: v|ffm|egan on May 05, 2006, 04:57:41 pm

Title: Newbie need some starting assistance...
Post by: v|ffm|egan on May 05, 2006, 04:57:41 pm
Hi,

I'm new to Code::Blocks, just installed the 4th May CB build. I created a new wx project using the wizard, didn't change anything and tried to compile it. This is what I get:

Code
./app.h:4: error: wx/wxprec.h: No such file or directory
./app.h:11: error: wx/wx.h: No such file or directory
./app.h:15: error: expected class-name before ‘{’ token
./app.h:15: warning: ‘class MyApp’ has virtual functions but non-virtual destructor
./main.h:7: error: expected class-name before ‘{’ token
./main.h:9: error: expected `)' before ‘*’ token
./main.h:12: error: ‘wxCommandEvent’ has not been declared
./main.h:13: error: ‘wxCommandEvent’ has not been declared
./main.h:14: error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type
app.cpp:4: error: expected constructor, destructor, or type conversion before ‘;’ token
app.cpp:8: error: ‘_’ was not declared in this scope
app.cpp:8: error: new initializer expression list treated as compound expression
app.cpp:9: error: ‘class MyFrame’ has no member named ‘Show’

I'm using Ubuntu Breezy and wxGTK2.6.3. Any ideas what to do? Thx in advance!

Regards,
Victor
Title: Re: Newbie need some starting assistance...
Post by: takeshimiya on May 05, 2006, 05:09:53 pm
Change PCH strategy to: Menu Project->Properties->Generate PCH in a directory alongside original header.

If that doesn't solves it, post again.
Title: Re: Newbie need some starting assistance...
Post by: v|ffm|egan on May 06, 2006, 09:51:42 pm
Thanks, this did the trick! :D

I already got a new problem, though... I added a new dialog using wxSmith to this project and tried to compile again. I didn't change anything else. This is what I get:

Code
newdialog.h:14: error: expected class-name before ‘{’ token
newdialog.h:17: error: expected `)' before ‘*’ token
newdialog.h:33: error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type
newdialog.h:34: error: expected ‘;’ before ‘}’ token
newdialog.h:34: error: expected `;' before ‘}’ token
newdialog.cpp:3: error: ‘wxDialog’ has not been declared
newdialog.cpp:6: error: expected constructor, destructor, or type conversion before ‘END_EVENT_TABLE’

I'm using g++ 4.0.2 20050808.

Regards,
Victor
Title: Re: Newbie need some starting assistance...
Post by: v|ffm|egan on May 11, 2006, 05:11:59 pm
No one got an idea...?
Title: Re: Newbie need some starting assistance...
Post by: TDragon on May 11, 2006, 05:22:02 pm
Most likely wx headers somehow not getting included for that particular source file.