Ich habe OpenCV dieses Mal neu kompiliert und die freigegebenen Bibliotheken auf NO:
gesetzt
Code: Select all
make -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=NO -DCMAKE_INSTALL_PREFIX=~/Desktop/ocv ..
Code: Select all
libopencv_core.a libopencv_imgproc.a libopencv_highgui.a
libopencv_video.a libopencv_imgcodecs.a libopencv_videoio.a
Code: Select all
#include
#include
using namespace cv;
using namespace std;
int main()
{
Mat a;
printf("hello world\n" );
return 0;
}
Code: Select all
libopencv_core.a(system.cpp.o): In function `cv::Mutex::Mutex()':
system.cpp:(.text._ZN2cv5MutexC2Ev+0x2c): undefined reference to `pthread_mutexattr_init'
system.cpp:(.text._ZN2cv5MutexC2Ev+0x39): undefined reference to `pthread_mutexattr_settype'
system.cpp:(.text._ZN2cv5MutexC2Ev+0x4c): undefined reference to `pthread_mutexattr_destroy'
libopencv_core.a(system.cpp.o): In function `cv::Mutex::trylock()':
system.cpp:(.text._ZN2cv5Mutex7trylockEv+0x8): undefined reference to `pthread_mutex_trylock'
libopencv_core.a(system.cpp.o): In function `cv::TlsAbstraction::TlsAbstraction()':
system.cpp:(.text._ZN2cv14TlsAbstractionC2Ev+0x9): undefined reference to `pthread_key_create'
libopencv_core.a(system.cpp.o): In function `cv::TlsAbstraction::~TlsAbstraction()':
p.s. G++- und Ubuntu-Version: g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Mobile version