Starting with ViSP video grabber demo, when compile, multiple error LNK2001 and 2019 presented

245 views Asked by At

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]}
0

There are 0 answers