hi to all, i’m trying to develop and addon based on vTerrain software http://vterrain.org/ , with which you can import maps terrain from DEM or other sources (and even custom made maps…) i can explain or better i can do a little tutorial for this. Bu t the reason of this thread is another. I receive an error while i compile the code because i think there is some C files that need to be excluded from source. I’m working on linux 64bit Ubuntu 12.04 , but i tested also in windows with VS2010 compiler. It was easier to solve in VS2010 because you can exclude the files from properties windows, but it’s a bit harder for me with makefiles. I tried with EXCLUDE_FROM_SOURCE but i get the same error. What’s wrong here?
this is the error that i receive:
------------- Build: Debug in libopenFrameworks ---------------
Target is up to date.
-------------- Build: Debug in vterrain ---------------
Using makefile: Makefile
compiling x86_64 object for: src/xmlhelper/exception.cpp
compiling x86_64 object for: src/xmlhelper/xmltok.c
src/xmlhelper/xmltok.c: In function initScan:
src/xmlhelper/xmltok.c:1534:2: warning: array subscript has type char [-Wchar-subscripts]
src/xmlhelper/easyxml.cpp:3:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
compiling x86_64 object for: src/xmlhelper/easyxml.cpp
compiling x86_64 object for: src/xmlhelper/widestring.cpp
compiling x86_64 object for: src/xmlhelper/xmlparse.c
src/xmlhelper/xmlparse.c:2342:16: warning: errorProcessor defined but not used [-Wunused-function]
compiling x86_64 object for: src/xmlhelper/include/xmltok_ns.c
src/xmlhelper/include/xmltok_ns.c:1:1: error: unknown type name ENCODING
src/xmlhelper/include/xmltok_ns.c:1:17: error: NS declared as function returning a function
src/xmlhelper/include/xmltok_ns.c: In function NS:
src/xmlhelper/include/xmltok_ns.c:3:3: warning: implicit declaration of function ns [-Wimplicit-function-declaration]
src/xmlhelper/include/xmltok_ns.c:3:14: error: internal_utf8_encoding undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:3:14: note: each undeclared identifier is reported only once for each function it appears in
src/xmlhelper/include/xmltok_ns.c: At top level:
src/xmlhelper/include/xmltok_ns.c:6:1: error: unknown type name ENCODING
src/xmlhelper/include/xmltok_ns.c:6:17: error: NS declared as function returning a function
src/xmlhelper/include/xmltok_ns.c:6:17: error: redefinition of NS
src/xmlhelper/include/xmltok_ns.c:1:17: note: previous definition of NS was here
src/xmlhelper/include/xmltok_ns.c: In function NS:
src/xmlhelper/include/xmltok_ns.c:14:34: error: internal_little2_encoding undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:14:71: error: internal_big2_encoding undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c: At top level:
src/xmlhelper/include/xmltok_ns.c:19:1: error: unknown type name ENCODING
src/xmlhelper/include/xmltok_ns.c:19:17: error: NS declared as function returning an array
src/xmlhelper/include/xmltok_ns.c:19:1: warning: parameter names (without types) in function declaration [enabled by default]
src/xmlhelper/include/xmltok_ns.c:19:1: error: function NS is initialized like a variable
src/xmlhelper/include/xmltok_ns.c:19:17: error: static declaration of NS follows non-static declaration
src/xmlhelper/include/xmltok_ns.c:6:17: note: previous definition of NS was here
src/xmlhelper/include/xmltok_ns.c:20:7: error: latin1_encoding undeclared here (not in a function)
src/xmlhelper/include/xmltok_ns.c:21:7: error: ascii_encoding undeclared here (not in a function)
src/xmlhelper/include/xmltok_ns.c:21:3: warning: excess elements in scalar initializer [enabled by default]
src/xmlhelper/include/xmltok_ns.c:21:3: warning: (near initialization for NS) [enabled by default]
src/xmlhelper/include/xmltok_ns.c:22:7: error: utf8_encoding undeclared here (not in a function)
src/xmlhelper/include/xmltok_ns.c:22:3: warning: excess elements in scalar initializer [enabled by default]
src/xmlhelper/include/xmltok_ns.c:22:3: warning: (near initialization for NS) [enabled by default]
src/xmlhelper/include/xmltok_ns.c:23:7: error: big2_encoding undeclared here (not in a function)
src/xmlhelper/include/xmltok_ns.c:23:3: warning: excess elements in scalar initializer [enabled by default]
src/xmlhelper/include/xmltok_ns.c:23:3: warning: (near initialization for NS) [enabled by default]
src/xmlhelper/include/xmltok_ns.c:24:3: warning: excess elements in scalar initializer [enabled by default]
src/xmlhelper/include/xmltok_ns.c:24:3: warning: (near initialization for NS) [enabled by default]
src/xmlhelper/include/xmltok_ns.c:25:7: error: little2_encoding undeclared here (not in a function)
src/xmlhelper/include/xmltok_ns.c:25:3: warning: excess elements in scalar initializer [enabled by default]
src/xmlhelper/include/xmltok_ns.c:25:3: warning: (near initialization for NS) [enabled by default]
src/xmlhelper/include/xmltok_ns.c:27:1: warning: excess elements in scalar initializer [enabled by default]
src/xmlhelper/include/xmltok_ns.c:27:1: warning: (near initialization for NS) [enabled by default]
src/xmlhelper/include/xmltok_ns.c:30:1: error: unknown type name ENCODING
src/xmlhelper/include/xmltok_ns.c:30:5: error: NS declared as function returning a function
src/xmlhelper/include/xmltok_ns.c: In function NS:
src/xmlhelper/include/xmltok_ns.c:33:3: warning: implicit declaration of function initScan [-Wimplicit-function-declaration]
src/xmlhelper/include/xmltok_ns.c:33:22: error: encodings undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:33:3: error: unknown type name INIT_ENCODING
src/xmlhelper/include/xmltok_ns.c:33:57: error: enc undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:33:62: error: XML_PROLOG_STATE undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:33:80: error: ptr undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:33:85: error: end undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:33:90: error: nextTokPtr undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c: At top level:
src/xmlhelper/include/xmltok_ns.c:37:1: error: unknown type name ENCODING
src/xmlhelper/include/xmltok_ns.c:37:5: error: NS declared as function returning a function
src/xmlhelper/include/xmltok_ns.c:37:5: error: redefinition of NS
src/xmlhelper/include/xmltok_ns.c:30:5: note: previous definition of NS was here
src/xmlhelper/include/xmltok_ns.c: In function NS:
src/xmlhelper/include/xmltok_ns.c:40:22: error: encodings undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:40:3: error: unknown type name INIT_ENCODING
src/xmlhelper/include/xmltok_ns.c:40:57: error: enc undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:40:62: error: XML_CONTENT_STATE undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:40:81: error: ptr undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:40:86: error: end undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:40:91: error: nextTokPtr undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c: At top level:
src/xmlhelper/include/xmltok_ns.c:43:25: error: unknown type name INIT_ENCODING
src/xmlhelper/include/xmltok_ns.c:43:25: error: unknown type name ENCODING
src/xmlhelper/include/xmltok_ns.c:58:1: error: unknown type name ENCODING
src/xmlhelper/include/xmltok_ns.c:58:1: error: unknown type name ENCODING
src/xmlhelper/include/xmltok_ns.c:58:17: error: NS declared as function returning a function
src/xmlhelper/include/xmltok_ns.c:58:17: error: redefinition of NS
src/xmlhelper/include/xmltok_ns.c:37:5: note: previous definition of NS was here
src/xmlhelper/include/xmltok_ns.c: In function NS:
src/xmlhelper/include/xmltok_ns.c:64:3: warning: implicit declaration of function XmlUtf8Convert [-Wimplicit-function-declaration]
src/xmlhelper/include/xmltok_ns.c:64:18: error: enc undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:64:24: error: ptr undeclared (first use in this function)
src/xmlhelper/include/xmltok_ns.c:64:29: error: end undeclared (first use in this function)
Process terminated with status 2 (0 minutes, 5 seconds)
50 errors, 19 warnings
this is my config.make
# add custom variables to this file
# OF_ROOT allows to move projects outside apps/* just set this variable to the
# absoulte path to the OF root folder
OF_ROOT = ../../..
# USER_CFLAGS allows to pass custom flags to the compiler
# for example search paths like:
# USER_CFLAGS = -I src/objects
USER_CFLAGS = -O2 -g -I/usr/local/include -I/usr/include/gdal -DVTUNIX=1 -DSUPPORT_BZIP2 -DSUPPORT_CURL
# USER_LDFLAGS allows to pass custom flags to the linker
# for example libraries like:
# USER_LDFLAGS = libs/libawesomelib.a
USER_LDFLAGS = -lGLU -lGL -lSM -lICE -lX11 -lXext -lcurl -lpng -ljpeg -lbz2
EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj,$(OF_ROOT)/examples/vTerrain/vterrain/src/xmlhelper/include"
# change this to add different compiler optimizations to your project
USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os
# android specific, in case you want to use different optimizations
USER_LIBS_ARM =
USER_LIBS_ARM7 =
USER_LIBS_NEON =
# android optimizations
ANDROID_COMPILER_OPTIMIZATION = -Os
NDK_PLATFORM = android-8
# uncomment this for custom application name (if the folder name is different than the application name)
#APPNAME = folderName
# uncomment this for custom package name, must be the same as the java package that contains OFActivity
#PKGNAME = cc.openframeworks.$(APPNAME)
# linux arm flags
LINUX_ARM7_COMPILER_OPTIMIZATIONS = -march=armv7-a -mtune=cortex-a8 -finline-functions -funroll-all-loops -O3 -funsafe-math-optimizations -mfpu=neon -ftree-vectorize -mfloat-abi=hard -mfpu=vfp
attached you can find the file build.make from cmake vterrain project to have an idea on hw should be