This has been asked before, and I've tried the suggestions found here:
http://forums.codeblocks.org/index.php/topic,7274.0.htmlThis hasn't worked for me, and my issue is identical.
Here's what I've got - linux mint recent release.
g++ (Ubuntu 4.4.1-4ubuntu9) 4.4.1
Code::Blocks 8.02
wx2.8.10 (Linux, Unicode)
This is an x64 setup
2.6.31-14-generic #48-Ubuntu SMP x86_64 GNU/Linux
So, I'm following the Code::Blocks wiki tutorials for HelloWorld. The first one with the Close button. I'm at the point where i wish to build the project.
When I do so, these are the errors i get:
-------------- Build: Debug in HelloWorld ---------------
Compiling: HelloWorldApp.cpp
In file included from /usr/include/wx-2.8/wx/debug.h:18,
from /usr/include/wx-2.8/wx/defs.h:521,
from /usr/include/wx-2.8/wx/event.h:15,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.h:13,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.cpp:10:
/usr/include/assert.h:39:42: error: missing binary operator before token "("
/usr/include/assert.h:108:42: error: missing binary operator before token "("
In file included from /usr/include/libio.h:62,
from /usr/include/stdio.h:75,
from /usr/include/wx-2.8/wx/wxchar.h:21,
from /usr/include/wx-2.8/wx/debug.h:22,
from /usr/include/wx-2.8/wx/defs.h:521,
from /usr/include/wx-2.8/wx/event.h:15,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.h:13,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.cpp:10:
/usr/include/sys/cdefs.h:46:44: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:50:44: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:135:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:148:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:206:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:215:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:224:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:233:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:245:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:255:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:264:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:272:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:286:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:294:43: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:317:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:326:20: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:331:20: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:338:19: error: missing binary operator before token "("
In file included from /usr/include/wx-2.8/wx/wxchar.h:101,
from /usr/include/wx-2.8/wx/debug.h:22,
from /usr/include/wx-2.8/wx/defs.h:521,
from /usr/include/wx-2.8/wx/event.h:15,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.h:13,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.cpp:10:
/usr/include/wchar.h:55:42: error: missing binary operator before token "("
In file included from /usr/include/sched.h:35,
from /usr/include/pthread.h:25,
from /usr/include/c++/4.4/x86_64-linux-gnu/bits/gthr-default.h:41,
from /usr/include/c++/4.4/x86_64-linux-gnu/bits/gthr.h:162,
from /usr/include/c++/4.4/ext/atomicity.h:34,
from /usr/include/c++/4.4/bits/basic_string.h:41,
from /usr/include/c++/4.4/string:53,
from /usr/include/wx-2.8/wx/string.h:176,
from /usr/include/wx-2.8/wx/wxchar.h:1323,
from /usr/include/wx-2.8/wx/debug.h:22,
from /usr/include/wx-2.8/wx/defs.h:521,
from /usr/include/wx-2.8/wx/event.h:15,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.h:13,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.cpp:10:
/usr/include/bits/sched.h:126:20: error: missing binary operator before token "("
/usr/include/bits/sched.h:164:20: error: missing binary operator before token "("
In file included from /usr/include/wx-2.8/wx/filefn.h:28,
from /usr/include/wx-2.8/wx/utils.h:21,
from /usr/include/wx-2.8/wx/cursor.h:41,
from /usr/include/wx-2.8/wx/event.h:22,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.h:13,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.cpp:10:
/usr/include/sys/types.h:158:20: error: missing binary operator before token "("
In file included from /usr/include/wx-2.8/wx/debug.h:18,
from /usr/include/wx-2.8/wx/defs.h:521,
from /usr/include/wx-2.8/wx/event.h:15,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.h:13,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.cpp:10:
/usr/include/assert.h:71: error: expected constructor, destructor, or type conversion before ‘extern’
/usr/include/assert.h:79: error: expected initializer before ‘__THROW’
/usr/include/assert.h:85: error: expected initializer before ‘__THROW’
/usr/include/assert.h:88: error: ‘__END_DECLS’ does not name a type
In file included from /usr/include/wx-2.8/wx/wxchar.h:21,
from /usr/include/wx-2.8/wx/debug.h:22,
from /usr/include/wx-2.8/wx/defs.h:521,
from /usr/include/wx-2.8/wx/event.h:15,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.h:13,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.cpp:10:
/usr/include/stdio.h:49: error: expected constructor, destructor, or type conversion before ‘typedef’
/usr/include/stdio.h:65: error: expected constructor, destructor, or type conversion before ‘typedef’
In file included from /usr/include/stdio.h:75,
from /usr/include/wx-2.8/wx/wxchar.h:21,
from /usr/include/wx-2.8/wx/debug.h:22,
from /usr/include/wx-2.8/wx/defs.h:521,
from /usr/include/wx-2.8/wx/event.h:15,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.h:13,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.cpp:10:
/usr/include/libio.h:332: error: ‘size_t’ does not name a type
/usr/include/libio.h:336: error: ‘size_t’ was not declared in this scope
/usr/include/libio.h:364: error: ‘size_t’ has not been declared
/usr/include/libio.h:373: error: ‘size_t’ has not been declared
/usr/include/libio.h:493: error: ‘size_t’ does not name a type
In file included from /usr/include/wx-2.8/wx/wxchar.h:21,
from /usr/include/wx-2.8/wx/debug.h:22,
from /usr/include/wx-2.8/wx/defs.h:521,
from /usr/include/wx-2.8/wx/event.h:15,
from /usr/include/wx-2.8/wx/app.h:20,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.h:13,
from /home/jax/coding/tutorials/HelloWorld/HelloWorldApp.cpp:10:
/usr/include/stdio.h:172: error: expected initializer before ‘*’ token
/usr/include/stdio.h:214: error: ‘FILE’ was not declared in this scope
/usr/include/stdio.h:214: error: ‘__stream’ was not declared in this scope
/usr/include/stdio.h:219: error: ‘FILE’ was not declared in this scope
/usr/include/stdio.h:219: error: ‘__stream’ was not declared in this scope
/usr/include/stdio.h:249: error: expected initializer before ‘*’ token
/usr/include/stdio.h:255: error: expected initializer before ‘*’ token
/usr/include/stdio.h:309: error: variable or field ‘setbuf’ declared void
/usr/include/stdio.h:309: error: ‘FILE’ was not declared in this scope
/usr/include/stdio.h:309: error: expected primary-expression before ‘__restrict__’
/usr/include/stdio.h:309: error: expected primary-expression before ‘char’
/usr/include/stdio.h:313: error: ‘FILE’ was not declared in this scope
/usr/include/stdio.h:313: error: expected primary-expression before ‘__restrict__’
/usr/include/stdio.h:313: error: expected primary-expression before ‘char’
/usr/include/stdio.h:314: error: expected primary-expression before ‘int’
Process terminated with status 1 (0 minutes, 1 seconds)
50 errors, 0 warnings
Now, trying to compile on the command line fails as well, but I guess because i'm not doing something right...
g++ HelloWorldMain.h HelloWorldMain.cpp HelloWorldApp.h HelloWorldApp.cpp `wx-config --libs` `wx-config --cxxflags` -o HelloWorld.out
HelloWorldMain.cpp: In member function ‘void HelloWorldFrame::OnQuit(wxCommandEvent&)’:
HelloWorldMain.cpp:115: error: no matching function for call to ‘HelloWorldFrame::Close()’
HelloWorldMain.h:35: note: candidates are: void HelloWorldFrame::Close(wxCommandEvent&)
HelloWorldMain.cpp: In member function ‘void HelloWorldFrame::Close(wxCommandEvent&)’:
HelloWorldMain.cpp:126: error: no matching function for call to ‘HelloWorldFrame::Close()’
HelloWorldMain.cpp:124: note: candidates are: void HelloWorldFrame::Close(wxCommandEvent&)
Now, I do have `wx-config --cxxflags` in my build options, compiler settings, other options for both debug and release. Same for the wx-config --libs in the linker part.
I'm sure it's something really simple, but alas, I'm new to this...
any help is greatly appreciated!
thanks,
Jack