LNK1120 LNK2019

asked 2015-12-09 07:17:02 -0600

Joohn gravatar image

updated 2015-12-09 07:43:28 -0600

I try building code from there. Code from imwrite function for saving an image to a file,but i have some errors. Libraries included in additional dependencies are: opencv_core300d.lib ,opencv_highgui300d.lib. Can you tell me what is wrong ?

errors

Error 8 error LNK1120: 7 unresolved externals C:\Users\florin10\Desktop\aplicatie\Debug\aplicatie.exe aplicatie

Error 7 error LNK2019: unresolved external symbol "bool __cdecl cv::imwrite(class cv::String const &,class cv::_InputArray const &,class std::vector<int,class std::allocator<int=""> > const &)" (?imwrite@cv@@YA_NABVString@1@ABV_InputArray@1@ABV?$vector@HV?$allocator@H@std@@@std@@@Z) referenced in function _main C:\Users\florin10\Desktop\aplicatie\aplicatie\aplicatie.obj aplicatie

Error 2 error LNK2019: unresolved external symbol "private: char * __thiscall cv::String::allocate(unsigned int)" (?allocate@String@cv@@AAEPADI@Z) referenced in function "public: __thiscall cv::String::String(char const *)" (??0String@cv@@QAE@PBD@Z) C:\Users\florin10\Desktop\aplicatie\aplicatie\aplicatie.obj aplicatie

Error 3 error LNK2019: unresolved external symbol "private: void __thiscall cv::String::deallocate(void)" (?deallocate@String@cv@@AAEXXZ) referenced in function "public: __thiscall cv::String::~String(void)" (??1String@cv@@QAE@XZ) C:\Users\florin10\Desktop\aplicatie\aplicatie\aplicatie.obj aplicatie

Error 5 error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::create(int,int const *,int)" (?create@Mat@cv@@QAEXHPBHH@Z) referenced in function "public: void __thiscall cv::Mat::create(int,int,int)" (?create@Mat@cv@@QAEXHHH@Z) C:\Users\florin10\Desktop\aplicatie\aplicatie\aplicatie.obj aplicatie

Error 6 error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::deallocate(void)" (?deallocate@Mat@cv@@QAEXXZ) referenced in function "public: void __thiscall cv::Mat::release(void)" (?release@Mat@cv@@QAEXXZ) C:\Users\florin10\Desktop\aplicatie\aplicatie\aplicatie.obj aplicatie

Error 4 error LNK2019: unresolved external symbol "void __cdecl cv::error(int,class cv::String const &,char const *,char const *,int)" (?error@cv@@YAXHABVString@1@PBD1H@Z) referenced in function "public: class cv::Vec<unsigned char,4=""> & __thiscall cv::Mat::at<class cv::vec<unsigned="" char,4=""> >(int,int)" (??$at@V?$Vec@E$03@cv@@@Mat@cv@@QAEAAV?$Vec@E$03@1@HH@Z) C:\Users\florin10\Desktop\aplicatie\aplicatie\aplicatie.obj aplicatie

Error 1 error LNK2019: unresolved external symbol "void __cdecl cv::fastFree(void *)" (?fastFree@cv@@YAXPAX@Z) referenced in function "public: __thiscall cv::Mat::~Mat(void)" (??1Mat@cv@@QAE@XZ) C:\Users\florin10\Desktop\aplicatie\aplicatie\aplicatie.obj aplicatie

edit retag flag offensive close merge delete

Comments

can you please post your errors as text, not as a screenshot ?

berak gravatar imageberak ( 2015-12-09 07:35:29 -0600 )edit

you need opencv_imgcodecs300d.lib for imread()/imwrite().

but, since there are a lot of errors, that should be covered by linking against opencv_core - are you sure, you edited the right property sheet ?

berak gravatar imageberak ( 2015-12-09 07:48:54 -0600 )edit

After adding opencv_imgcodecs300d.lib to Additional Dependencies, I have a new error Error 2 error MSB6006: "link.exe" exited with code 1120. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 611 5 aplicatie

I use VS2012 x64

Joohn gravatar imageJoohn ( 2015-12-09 07:56:49 -0600 )edit