0

I am new to C++, openCV and Artoolkit I am trying to build a motion tracker devices right now, I am following the tutorial

https://artoolkit.org/blog/2016/05/opencv-with-artoolkit

However I meet some problem when I trying to implement this on SimpleTest on the Linux machine.

The error I get is like this:

"clang++ -c -O3 -fPIC -march=core2 -DHAVE_NFT=1 -I/usr/include/x86_64-linux-gnu -pthread -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../../include simpleTest.c

clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated In file included from simpleTest.c:79: In file included from ../../include/linux-x86_64/opencv2/opencv.hpp:59:/usr/include/opencv2/contrib/contrib.hpp:273:23: error: no template named
  'vector'; did you mean 'std::vector'?"

simpleTest code

I added line like this

#include <linux-x86_64/opencv2/opencv.hpp>
#include <linux-x86_64/opencv2/opencv_modules.hpp>
using namespace std;
using namespace cv;

in the make file: I add some this:

LIBS= -lARgsub -lARvideo -lAR -lARICP -lAR -lglut -lGLU -lGL -lX11 -lm -lpthread -ljpeg -pthread -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lxml2 -lglib-2.0 -ldc1394 -lraw1394 -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_viz -lippicv -lopencv_core 

and

CC = clang++
MWiesner
  • 8,868
  • 11
  • 36
  • 70

1 Answers1

0

There are some similar issues found on SO here.....

Linking C from C++ in OS X Mavericks

Warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated

There's a mismatch between C++ and C.

To get around this, it would be best if you used ARWrapper for ARToolkit within a C++ framework.

Community
  • 1
  • 1
Dan Bell
  • 33
  • 6