I have a vc++ 32 bit console application I have all the paths set correct, all the libraries included including the numerous libs from staticlib directory. VSS target architecture is set to x64 on windows 8 i7 machine. Still I get the following errors for the following code:
include<iostream>
include<opencv.hpp>
include<opencv2 highgui="" highgui.hpp="">
include<opencv2 imgproc="" imgproc.hpp="">
include<opencv2 core="" core.hpp="">
int main(int argc, char* argv[]){
int i;
std::cout << "OpenCV Version: " << CV_VERSION << std::endl;
cv::Mat img = cv::imread("D:\opencvImages\OpenCvImg.png",CV_LOAD_IMAGE_COLOR);
cv::namedWindow("imgwin",CV_WINDOW_AUTOSIZE);
cv::imshow("imgwin", img);
std::cin >> i;
return 0;
}
Link errors: Error 3 error LNK2019: unresolved external symbol "void __cdecl cv::fastFree(void *)" (?fastFree@cv@@YAXPEAX@Z) referenced in function "public: __cdecl cv::Mat::~Mat(void)" (??1Mat@cv@@QEAA@XZ) D:\Projects\cappTest\cappTest\main.obj cappTest Error 4 error LNK2019: unresolved external symbol "private: char * __cdecl cv::String::allocate(unsigned __int64)" (?allocate@String@cv@@AEAAPEAD_K@Z) referenced in function "public: __cdecl cv::String::String(char const *)" (??0String@cv@@QEAA@PEBD@Z) D:\Projects\cappTest\cappTest\main.obj cappTest Error 5 error LNK2019: unresolved external symbol "private: void __cdecl cv::String::deallocate(void)" (?deallocate@String@cv@@AEAAXXZ) referenced in function "public: __cdecl cv::String::~String(void)" (??1String@cv@@QEAA@XZ) D:\Projects\cappTest\cappTest\main.obj cappTest Error 6 error LNK2019: unresolved external symbol "public: void __cdecl cv::Mat::deallocate(void)" (?deallocate@Mat@cv@@QEAAXXZ) referenced in function "public: void __cdecl cv::Mat::release(void)" (?release@Mat@cv@@QEAAXXZ) D:\Projects\cappTest\cappTest\main.obj cappTest Error 7 error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::imread(class cv::String const &,int)" (?imread@cv@@YA?AVMat@1@AEBVString@1@H@Z) referenced in function main D:\Projects\cappTest\cappTest\main.obj cappTest Error 8 error LNK2019: unresolved external symbol "void __cdecl cv::namedWindow(class cv::String const &,int)" (?namedWindow@cv@@YAXAEBVString@1@H@Z) referenced in function main D:\Projects\cappTest\cappTest\main.obj cappTest Error 9 error LNK2019: unresolved external symbol "void __cdecl cv::imshow(class cv::String const &,class cv::_InputArray const &)" (?imshow@cv@@YAXAEBVString@1@AEBV_InputArray@1@@Z) referenced in function main D:\Projects\cappTest\cappTest\main.obj cappTest
Libraries included in additional dependenciesare: opencv_ts300.lib opencv_ts300d.lib opencv_world300.lib opencv_world300d.lib opencv_core300d.lib opencv_imgproc300d.lib opencv_highgui300d.lib opencv_ml300d.lib opencv_video300d.lib opencv_features2d300d.lib opencv_calib3d300d.lib opencv_objdetect300d.lib opencv_flann300d.lib opencv_hal300d.lib opencv_imgcodecs300d.lib opencv_photo300d.lib opencv_shape300d.lib opencv_stitching300d.lib opencv_superres300d.lib opencv_video300d.lib opencv_videostab300d.lib opencv_videoio300d.lib IlmImfd.lib libjasperd.lib ippicvmt.lib libjpegd.lib libpngd.lib libtiffd.lib libwebpd.lib
Where am I going wrong?