This seems to be some preprocessor error. Just including the ofxJSON addon is enough to choke gcc in the preprocessing phase. Anybody any experience with debugging preprocessor errors?
I tried this on Debian Wheezy(gcc 4.7) and Ubuntu Precise(gcc 4.6) same errors. This doens’t happen on OSX (gcc 4.2). From google I get this comes from some preprocessor statements…
see: https://github.com/jefftimesten/ofxJSON/issues/2
I’ve narrowed the gcc command down to:
g++ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -DOF_USING_GTK -DOF_USING_MPG123 -Wall -fexceptions -I. -I../../../libs/glu/include -pthread -I/usr/include/GL -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I../../../libs/FreeImage/include -I../../../libs/assimp/include -I../../../libs/assimp/include/Compiler -I../../../libs/cairo/include -I../../../libs/cairo/include/cairo -I../../../libs/cairo/include/pixman-1 -I../../../libs/cairo/include/libpng15 -I../../../libs/freetype/include -I../../../libs/freetype/include/freetype2 -I../../../libs/freetype/include/freetype2/freetype -I../../../libs/freetype/include/freetype2/freetype/internal -I../../../libs/freetype/include/freetype2/freetype/internal/services -I../../../libs/freetype/include/freetype2/freetype/config -I../../../libs/kiss/include -I../../../libs/portaudio/include -I../../../libs/rtAudio/include -I../../../libs/tess2/include -I../../../libs/videoInput/include -I../../../libs/poco/include -I../../../libs/openFrameworks/ -I../../../libs/openFrameworks/math -I../../../libs/openFrameworks/sound -I../../../libs/openFrameworks/3d -I../../../libs/openFrameworks/graphics -I../../../libs/openFrameworks/types -I../../../libs/openFrameworks/utils -I../../../libs/openFrameworks/gl -I../../../libs/openFrameworks/communication -I../../../libs/openFrameworks/.settings -I../../../libs/openFrameworks/video -I../../../libs/openFrameworks/events -I../../../libs/openFrameworks/app -g3 -I../../../addons/../../ofAddons/ofxJSON/libs -I../../../addons/../../ofAddons/ofxJSON/src -I../../../addons/../../ofAddons/ofxJSON/libs -I../../../addons/../../ofAddons/ofxJSON/libs/src -I../../../addons/../../ofAddons/ofxJSON/libs/src/lib_json -I../../../addons/../../ofAddons/ofxJSON/libs/include -I../../../addons/../../ofAddons/ofxJSON/libs/include/json -Isrc -MMD -MP -MFobj/x86_64Debug/addons/../../ofAddons/ofxJSON/src/ofxJSONElement.d -MTobj/x86_64Debug/addons/../../ofAddons/ofxJSON/src/ofxJSONElement.o -o obj/x86_64Debug/addons/../../ofAddons/ofxJSON/src/ofxJSONElement.o -c ../../../addons/../../ofAddons/ofxJSON/src/ofxJSONElement.cpp
I’m using a different addon dir in case you wondered.
The error is huge but starts with this:
In file included from /usr/include/c++/4.6/cwchar:46:0,
from /usr/include/c++/4.6/bits/postypes.h:42,
from /usr/include/c++/4.6/iosfwd:42,
from /usr/include/c++/4.6/ios:39,
from /usr/include/c++/4.6/ostream:40,
from /usr/include/c++/4.6/iostream:40,
from ../../../addons/../../ofAddons/ofxJSON/src/ofxJSONElement.h:13,
from ../../../addons/../../ofAddons/ofxJSON/src/ofxJSONElement.cpp:10:
/usr/include/wchar.h:75:43: error: missing binary operator before token "("
In file included from /usr/include/sched.h:43:0,
from /usr/include/pthread.h:25,
from /usr/include/c++/4.6/x86_64-linux-gnu/./bits/gthr-default.h:41,
from /usr/include/c++/4.6/x86_64-linux-gnu/./bits/gthr.h:170,
from /usr/include/c++/4.6/ext/atomicity.h:34,
from /usr/include/c++/4.6/bits/ios_base.h:41,
from /usr/include/c++/4.6/ios:43,
from /usr/include/c++/4.6/ostream:40,
from /usr/include/c++/4.6/iostream:40,
from ../../../addons/../../ofAddons/ofxJSON/src/ofxJSONElement.h:13,
from ../../../addons/../../ofAddons/ofxJSON/src/ofxJSONElement.cpp:10:
/usr/include/x86_64-linux-gnu/bits/sched.h:133:20: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/bits/sched.h:171:20: error: missing binary operator before token "("
In file included from /usr/include/libio.h:62:0,
from /usr/include/stdio.h:75,
from /usr/include/c++/4.6/cstdio:44,
from /usr/include/c++/4.6/fstream:43,
from ../../../addons/../../ofAddons/ofxJSON/src/ofxJSONElement.h:14,
from ../../../addons/../../ofAddons/ofxJSON/src/ofxJSONElement.cpp:10:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:43:20: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:56:44: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:61:44: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:149:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:162:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:224:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:233:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:240:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:249:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:258:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:270:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:280:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:289:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:297:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:311:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:319:43: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:342:19: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:351:20: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:356:20: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/sys/cdefs.h:363:19: error: missing binary operator before token "("
In file included from /usr/include/X11/Xlib.h:38:0,
etc......