User forums > Using Code::Blocks
Newbie need some starting assistance...
(1/1)
v|ffm|egan:
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’
--- End code ---
I'm using Ubuntu Breezy and wxGTK2.6.3. Any ideas what to do? Thx in advance!
Regards,
Victor
takeshimiya:
Change PCH strategy to: Menu Project->Properties->Generate PCH in a directory alongside original header.
If that doesn't solves it, post again.
v|ffm|egan:
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’
--- End code ---
I'm using g++ 4.0.2 20050808.
Regards,
Victor
v|ffm|egan:
No one got an idea...?
TDragon:
Most likely wx headers somehow not getting included for that particular source file.
Navigation
[0] Message Index
Go to full version