Adding Boost C++ Libraries to OpenCV - Error [closed]

asked 2015-01-06 03:38:51 -0600

Gopi Krishnan gravatar image

updated 2015-01-06 05:03:39 -0600

I test the sample program by using BOOST C++ Library , On Compiling the sample Program shows following error log.

Sample Program : main.cpp

#include <iostream>
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/bind.hpp>

boost::mutex io_mutex;

void count(int id) 
{
    for (int i = 0; i < 10; ++i) 
{
        boost::mutex::scoped_lock lock(io_mutex);
        std::cout << id << ": " << i << std::endl;
    }
}

int main(int argc, char* argv[])
{
    boost::thread thrd1(boost::bind(&count, 1));
    boost::thread thrd2(boost::bind(&count, 2));
    thrd1.join();
    thrd2.join();
    return 0;
}

Error Log:

CLEAN SUCCESSFUL (total time: 788ms)
"/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/Applications/Xcode.app/Contents/Developer/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/boosttest
mkdir -p build/Debug/GNU-MacOSX
rm -f "build/Debug/GNU-MacOSX/main.o.d"
g++    -c -g -I/usr/local/include -I/usr/local/include/opencv -I/usr/local/include/opencv2 -I../boost-master -MMD -MP -MF "build/Debug/GNU-MacOSX/main.o.d" -o build/Debug/GNU-MacOSX/main.o main.cpp
mkdir -p dist/Debug/GNU-MacOSX
g++     -o dist/Debug/GNU-MacOSX/boosttest build/Debug/GNU-MacOSX/main.o -L/usr/local/lib -L../boost-master/libs /usr/local/lib/libopencv_calib3d.2.4.9.dylib /usr/local/lib/libopencv_calib3d.2.4.dylib /usr/local/lib/libopencv_calib3d.dylib /usr/local/lib/libopencv_contrib.2.4.9.dylib /usr/local/lib/libopencv_contrib.2.4.dylib /usr/local/lib/libopencv_contrib.dylib /usr/local/lib/libopencv_core.2.4.9.dylib /usr/local/lib/libopencv_core.2.4.dylib /usr/local/lib/libopencv_core.dylib /usr/local/lib/libopencv_features2d.2.4.9.dylib /usr/local/lib/libopencv_features2d.2.4.dylib /usr/local/lib/libopencv_features2d.dylib /usr/local/lib/libopencv_flann.2.4.9.dylib /usr/local/lib/libopencv_flann.2.4.dylib /usr/local/lib/libopencv_flann.dylib /usr/local/lib/libopencv_gpu.2.4.9.dylib /usr/local/lib/libopencv_gpu.2.4.dylib /usr/local/lib/libopencv_gpu.dylib /usr/local/lib/libopencv_highgui.2.4.9.dylib /usr/local/lib/libopencv_highgui.2.4.dylib /usr/local/lib/libopencv_highgui.dylib /usr/local/lib/libopencv_imgproc.2.4.9.dylib /usr/local/lib/libopencv_imgproc.2.4.dylib /usr/local/lib/libopencv_imgproc.dylib /usr/local/lib/libopencv_legacy.2.4.9.dylib /usr/local/lib/libopencv_legacy.2.4.dylib /usr/local/lib/libopencv_legacy.dylib /usr/local/lib/libopencv_ml.2.4.9.dylib /usr/local/lib/libopencv_ml.2.4.dylib /usr/local/lib/libopencv_ml.dylib /usr/local/lib/libopencv_nonfree.2.4.9.dylib /usr/local/lib/libopencv_nonfree.2.4.dylib /usr/local/lib/libopencv_nonfree.dylib /usr/local/lib/libopencv_objdetect.2.4.9.dylib /usr/local/lib/libopencv_objdetect.2.4.dylib /usr/local/lib/libopencv_objdetect.dylib /usr/local/lib/libopencv_ocl.2.4.9.dylib /usr/local/lib/libopencv_ocl.2.4.dylib /usr/local/lib/libopencv_ocl.dylib /usr/local/lib/libopencv_photo.2.4.9.dylib /usr/local/lib/libopencv_photo.2.4.dylib /usr/local/lib/libopencv_photo.dylib /usr/local/lib/libopencv_stitching.2.4.9.dylib /usr/local/lib/libopencv_stitching.2.4.dylib /usr/local/lib/libopencv_stitching.dylib ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by StevenPuttemans
close date 2015-01-06 05:41:51.190294

Comments

1

Actually this isn't an OpenCV problem but a boost library related problem. You are not using any OpenCV related functions I suggest addressing the proper forum right here or use more general forums like stackoverflow.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-06 05:41:35 -0600 )edit