0

I'm learning ViSP Tool from INRIA, my configuration is VS2010 + Visp 2.10 + OpenCV 2.4.8. Firstly I use C-Make generate sln , by compiling the sln, I got vispd.lib and visp/include/xxx.h; I also set include path , lib path and lib dependencies; When I begin my first demo to open an image (maily use vpImage.h), it works well; However, here comes the question, when I use same configuration to compile the following code, it comes out 144 errors!! The chinese characters stands for "unresolved external symbol" .

#include <visp/vpDisplayOpenCV.h>
#include <visp/vpOpenCVGrabber.h>
#include <iostream>

using namespace std;

int main()
{
//#ifdef VISP_HAVE_OPENCV
//try
{
    vpImage<unsigned char> I;
    vpOpenCVGrabber g;
    g.open(I);

    std::cout<<"Image size:"<<I.getWidth()<<" "<<I.getHeight()<<std::endl;
    vpDisplayOpenCV d(I);

    while(1)
    {
        g.acquire(I);
        vpDisplay::display(I);
        vpDisplay::flush(I);
        if(vpDisplay::getClick(I,false))
            break;
    }
}
return 0;
//  catch(vpException e)
//  {
//      std::cout << "Catch an exception:" << e << std::endl;
//  }
//#endif
![total 144 errors no matter how I edit my original codes][1]}
Luke
  • 11,374
  • 2
  • 48
  • 61
Xuyue Yin
  • 1
  • 1
  • Did you miss to link the opencv or the opengl library? – πάντα ῥεῖ Nov 19 '14 at 14:31
  • Nope. I solved this problem by copy the original work well image show and save project and then replace the cpp with new codes. Since the first test demo runs well, it provides correct environment settings. – Xuyue Yin Dec 12 '14 at 08:21

0 Answers0