Reputation: 85
Can anyone share how to use OpenCV with C++ SkeletalViewer sample ?
I am using OpenCV2.3 with with SkeletalViewer sample. However, I got the following errors while trying to create an image using cvCreateImage();
error LNK2001: unresolved external symbol _cvCreateImage C:\Users\Public\Documents\Microsoft Research KinectSDK Samples\NUI\SkeletalViewer - Copy\CPP\NuiImpl.obj SkeletalViewer error LNK1120: 1 unresolved externals C:\Users\Public\Documents\Microsoft Research KinectSDK Samples\NUI\SkeletalViewer - Copy\CPP\Debug\SkeletalViewer.exe SkeletalViewer
Thanks a lot!
Upvotes: 1
Views: 1863
Reputation: 14021
It sounds like you haven't added the library to your project. Right-click your project and go to Properties. Then go to Linker >> General >> Additional Library Directories, set this to "$(YOUR_OPENCV_ROOT)\lib". Next, go to Linker >> Input >> Additional Dependencies and make sure opencv_core230.lib (or opencv_core231.lib, which ever 2.3.x version you are using) is in there.
Also, I would highly suggest using the C++ interface as it has more functionality than the C interface especially in OpenCV 2.3.x.
Hope that helps!
Upvotes: 1