User forums > Using Code::Blocks
Error "assert.h: missing binary operator" when creating/compiling new projects
ascii_moe:
Hi all,
I know that this topic has already been discussed two times in this forum:
http://forums.codeblocks.org/index.php/topic,7274.0.html
and
http://forums.codeblocks.org/index.php?topic=11911.msg81009
Since both threads didn't solve my problem - the first one didn't work and the second one seemed to be fixed, but it was never explained, HOW... - I'm going to start another try:
I am new to Code::Blocks and already went through several HowTo's, etc. My problem is as follows:
Yesterday I created a new project, compiled it, tested it - everything worked fine as the times before.
Today I created another project, but now compiling fails with an error message:
" /usr/include/assert.h:39:42: Error: missing binary operator before Token »(« "
The curiosity is:
This happens every time I create a NEW project. But when I change code of YESTERDAY's project, save and compile it everything works perfect!?
No error occurs, compiling succeeds.
I've checked the compiler and linker setting of both projects. They're exactly the same! - What is going on here?
Below I've listed some Build/Log output.
Thanks in advance for any help or useful information!
(And I promise I will post the solution, if there will be one !!!)
Regards,
Thomas
1) -------------- Build: Debug in HiWorld ---------------
Precompiling header: wx_pch.h
In Datei, eingefügt von /usr/local/include/wx-2.8/wx/debug.h:18,
von /usr/local/include/wx-2.8/wx/defs.h:521,
von /usr/local/include/wx-2.8/wx/wxprec.h:13,
von ./wx_pch.h:14,
von <Kommandozeile>:0:
/usr/include/assert.h:39:42: Fehler: fehlender binärer Operator vor Token »(«
/usr/include/assert.h:108:42: Fehler: fehlender binärer Operator vor Token »(«
In Datei, eingefügt von /usr/include/libio.h:62,
von /usr/include/stdio.h:75,
von /usr/local/include/wx-2.8/wx/wxchar.h:21,
von /usr/local/include/wx-2.8/wx/debug.h:22,
von /usr/local/include/wx-2.8/wx/defs.h:521,
von /usr/local/include/wx-2.8/wx/wxprec.h:13,
von ./wx_pch.h:14,
von <Kommandozeile>:0:
/usr/include/sys/cdefs.h:46:44: Fehler: fehlender binärer Operator vor Token »(«
/usr/include/sys/cdefs.h:50:44: Fehler: fehlender binärer Operator vor Token »(«
[...]
2) === HiWorld, Debug ===
/usr/include/assert.h|39|Fehler: fehlender binärer Operator vor Token »(«|
/usr/include/assert.h|108|Fehler: fehlender binärer Operator vor Token »(«|
/usr/include/sys/cdefs.h|46|Fehler: fehlender binärer Operator vor Token »(«|
[...]
3) $ gcc -dD -E HiWorldMain.cpp | grep GNUC_PREREQ
In Datei, eingefügt von /usr/include/wx/defs.h:21,
von /usr/include/wx/wxprec.h:13,
von wx_pch.h:14,
von HiWorldMain.cpp:10:
/usr/include/wx/platform.h:196:22: Fehler: wx/setup.h: No such file or directory
In Datei, eingefügt von /usr/include/wx/platform.h:293,
von /usr/include/wx/defs.h:21,
von /usr/include/wx/wxprec.h:13,
von wx_pch.h:14,
von HiWorldMain.cpp:10:
/usr/include/wx/chkconf.h:103:9: Fehler: #error "wxUSE_DYNLIB_CLASS must be defined."
/usr/include/wx/chkconf.h:111:9: Fehler: #error "wxUSE_EXCEPTIONS must be defined."
/usr/include/wx/chkconf.h:119:9: Fehler: #error "wxUSE_FILESYSTEM must be defined."
[...]
/usr/include/wx/chkconf.h:1765:9: Fehler: #error "wxMessageBox is always needed"
In Datei, eingefügt von /usr/include/wx/wxprec.h:13,
von wx_pch.h:14,
von HiWorldMain.cpp:10:
/usr/include/wx/defs.h:42:13: Fehler: #error "No Target! You should use wx-config program for compilation flags!"
#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
In Datei, eingefügt von /usr/include/wx/memory.h:16,
von /usr/include/wx/object.h:20,
von /usr/include/wx/wx.h:16,
von wx_pch.h:21,
von HiWorldMain.cpp:10:
/usr/include/wx/string.h:164:4: Fehler: #error "Please define string case-insensitive compare for your OS/compiler"
In Datei, eingefügt von /usr/include/wx/cmndata.h:17,
von /usr/include/wx/wx.h:65,
von wx_pch.h:21,
von HiWorldMain.cpp:10:
/usr/include/wx/encinfo.h:64:6: Fehler: #error "Unsupported toolkit"
- End -
Jenna:
Please turn on full commandline logging and post what is sent to the compiler:
change "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline"
And please tell which OS (looks like linux, but which distro), compiler and wxWidgets-version (it's 2.8, but which minor-version) you use.
ascii_moe:
Hi!
Please find the requested details below:
-------------- Build: Debug in HiWorld ---------------
g++ -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -I/usr/include/mysql -I/usr/local/include/mysql++ -I/usr/include/wx -c /home/tw/workspace_wxwidgets/HiWorld/wx_pch.h -o wx_pch.h.gch/Debug_wx_pch_h_gch
- Ubuntu Hardy Heron 8.04 LTS (amd64)
- Compiler: g++ (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
- wxWidgets-Version: 2.8.10.1-0
Jenna:
If I see it right, you use self-compiled (ansi-)version of wxwidgets.
Is there any cause not to use unicode and the prebuild-binaries ?
How did you configure wxwidgets before compiling ?
ascii_moe:
No, I don't use a self-compiled version (as far as I know).
I installed wxWidgets the way I found on http://wiki.wxwidgets.org/Installing_and_configuring_under_Ubuntu .
Since I am new to wxWidgets, was that wrong?
What "unicode and prebuild-binaries" do you mean?
Navigation
[0] Message Index
[#] Next page
Go to full version