That is odd, I get a different problem from command line.
nass@z61m:~/dev/examples/addons/opeNI-SimpleExamples$ make
compiling object for: src/testApp.cpp
mkdir -p obj/Release/src
g++ -c -march=native -mtune=native -O3 -Wall -fexceptions -I. -I…/…/…/libs/FreeImage/include -I…/…/…/libs/assimp/include -I…/…/…/libs/assimp/include/Compiler -I…/…/…/libs/fmodex/include -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/glew/include -I…/…/…/libs/glew/include/GL -I…/…/…/libs/glfw/include -I…/…/…/libs/glfw/include/GLFW -I…/…/…/libs/kiss/include -I…/…/…/libs/openssl/include -I…/…/…/libs/openssl/include/openssl -I…/…/…/libs/poco/include -I…/…/…/libs/poco/include/Poco -I…/…/…/libs/poco/include/Poco/DOM -I…/…/…/libs/poco/include/Poco/Crypto -I…/…/…/libs/poco/include/Poco/Net -I…/…/…/libs/poco/include/Poco/Zip -I…/…/…/libs/poco/include/Poco/SAX -I…/…/…/libs/poco/include/Poco/Dynamic -I…/…/…/libs/poco/include/Poco/Data -I…/…/…/libs/poco/include/Poco/XML -I…/…/…/libs/poco/include/Poco/Util -I…/…/…/libs/poco/include/CppUnit -I…/…/…/libs/portaudio/include -I…/…/…/libs/rtAudio/include -I…/…/…/libs/tess2/include -I…/…/…/libs/openFrameworks/ -I…/…/…/libs/openFrameworks/events -I…/…/…/libs/openFrameworks/.settings -I…/…/…/libs/openFrameworks/utils -I…/…/…/libs/openFrameworks/video -I…/…/…/libs/openFrameworks/graphics -I…/…/…/libs/openFrameworks/3d -I…/…/…/libs/openFrameworks/gl -I…/…/…/libs/openFrameworks/communication -I…/…/…/libs/openFrameworks/sound -I…/…/…/libs/openFrameworks/app -I…/…/…/libs/openFrameworks/math -I…/…/…/libs/openFrameworks/types pkg-config gstreamer-0.10 gstreamer-video-0.10 gstreamer-base-0.10 libudev --cflags
-I/usr/include -MMD -MP -MFobj/Release/src/testApp.d -MTobj/Release/src/testApp.d -oobj/Release/src/testApp.o -c src/testApp.cpp
Package gstreamer-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing gstreamer-0.10.pc' to the PKG\_CONFIG\_PATH environment variable No package 'gstreamer-0.10' found Package gstreamer-video-0.10 was not found in the pkg-config search path. Perhaps you should add the directory containing
gstreamer-video-0.10.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘gstreamer-video-0.10’ found
Package gstreamer-base-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-base-0.10.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘gstreamer-base-0.10’ found
In file included from src/testApp.cpp:1:0:
src/testApp.h:4:23: fatal error: ofxOpenNI.h: No such file or directory
compilation terminated.
make: *** [obj/Release/src/testApp.o] Error 1
nass@z61m:~/dev/examples/addons/opeNI-SimpleExamples$
I verified I have gstreamer installed, by reinstalling everything:
sudo add-apt-repository ppa:gstreamer-developers/ppa
sudo apt-get update
sudo apt-get install gstreamer1.0*
Then as per suggested by make, I tried to locate the “*.pc” files but I can’t find any.
did “updatedb”, then “locate gstreamer-base-0.10.pc”.
The problem with gstreamer persists.
As for the missing “ofxOpenNI.h” file, I look for config.make in the root example folder (/examples/addons/opeNI-SimpleExamples/). There is none to be found, but makefile itself seems to have $USER_CFLAGS variable exactly for that scope.
In turn I had to add the following for the compilation to succeed:
USER_CFLAGS = \
-I…/…/…/addons/ofxOpenNI/src/ \
-I…/…/…/addons/ofxOpenNI/include/openni/ \
-I/usr/include/cairo/ \
-I/usr/include/gstreamer-1.0/ \
-I/usr/include/glib-2.0/ \
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include/
the “cairo” statement is used to overcome the problem with the “cairo-features.h” that I could see in codeblocks too, but apparently there are more things needed. I wonder how code:blocks building knew about the 2 first ones.
Also I start wondering If I really need to include all these headers by hand, or I am taking a wring path here…
In any case, with these additions the compilation completed (albeit with many warnings).
I get many linker errors for “multiple definition”, so I moved the “src-*” folders out of the examples folder.
This leaves me with only one “undefined reference” problem:
linking bin/opeNI-SimpleExamples
g++ -o bin/opeNI-SimpleExamples obj/Release/src/testApp.o obj/Release/src/main.o -L…/…/…/libs/fmodex/lib/linux64 -L…/…/…/libs/glfw/lib/linux64 -L…/…/…/libs/kiss/lib/linux64 -L…/…/…/libs/openFrameworksCompiled/lib/linux64 -L…/…/…/libs/poco/lib/linux64 -L…/…/…/libs/rtAudio/lib/linux64 -L…/…/…/libs/tess2/lib/linux64 -Wl,-rpath=./libs -lopenFrameworks -lfmodex -lglfw3 -lkiss -lPocoCrypto -lPocoData -lPocoDataMySQL -lPocoDataODBC -lPocoDataSQLite -lPocoFoundation -lPocoNet -lPocoNetSSL -lPocoUtil -lPocoXML -lPocoZip -lRtAudio -ltess2 pkg-config gstreamer-0.10 gstreamer-video-0.10 gstreamer-base-0.10 libudev --libs
-lglut -lGL -lGLU -lasound -L/usr/lib/x86_64-linux-gnu/
Package gstreamer-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing gstreamer-0.10.pc' to the PKG\_CONFIG\_PATH environment variable No package 'gstreamer-0.10' found Package gstreamer-video-0.10 was not found in the pkg-config search path. Perhaps you should add the directory containing
gstreamer-video-0.10.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘gstreamer-video-0.10’ found
Package gstreamer-base-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-base-0.10.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘gstreamer-base-0.10’ found
/usr/bin/ld: …/…/…/libs/glfw/lib/linux64/libglfw3.a(x11_window.c.o): undefined reference to symbol ‘XConvertSelection’
/usr/bin/ld: note: ‘XConvertSelection’ is defined in DSO /usr/lib/x86_64-linux-gnu/libX11.so.6 so try adding it to the linker command line
/usr/lib/x86_64-linux-gnu/libX11.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [bin/opeNI-SimpleExamples] Error 1
I tried adding the following in the designated variables in the make file again
USER_LDFLAGS = -lX11
#USER_LDFLAGS = -l:libX11.so.6
USER_LIBS = -L/usr/lib/x86_64-linux-gnu/
but the error persists . Note that I tried to include the libX11.so with the 2 different $USER_LDFLAGS variables (one at a time), but they both failed. Am I linking something the wrong way?