LNK1120 LNK2019

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

Joohn gravatar image

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

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 &)" ([email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@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)" ([email protected]@[email protected]@[email protected]) referenced in function "public: __thiscall cv::String::String(char const *)" ([email protected]@@[email protected]@Z) C:\Users\florin10\Desktop\aplicatie\aplicatie\aplicatie.obj aplicatie

Error 3 error LNK2019: unresolved external symbol "private: void __thiscall cv::String::deallocate(void)" ([email protected]@[email protected]@AAEXXZ) referenced in function "public: __thiscall cv::String::~String(void)" ([email protected]@@[email protected]) 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)" ([email protected]@[email protected]@[email protected]) referenced in function "public: void __thiscall cv::Mat::create(int,int,int)" ([email protected]@[email protected]@[email protected]) C:\Users\florin10\Desktop\aplicatie\aplicatie\aplicatie.obj aplicatie

Error 6 error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::deallocate(void)" ([email protected]@[email protected]@QAEXXZ) referenced in function "public: void __thiscall cv::Mat::release(void)" ([email protected]@[email protected]@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)" ([email protected]@@[email protected]@[email protected]) referenced in function "public: class cv::Vec<unsigned char,4=""> & __thiscall cv::Mat::at<class cv::vec<unsigned="" char,4=""> >(int,int)" ([email protected][email protected][email protected]@@@[email protected]@@[email protected][email protected]@[email protected]) C:\Users\florin10\Desktop\aplicatie\aplicatie\aplicatie.obj aplicatie

Error 1 error LNK2019: unresolved external symbol "void __cdecl cv::fastFree(void *)" ([email protected]@@[email protected]) referenced in function "public: __thiscall cv::Mat::~Mat(void)" ([email protected]@@[email protected]) 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 -0500 )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 -0500 )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 -0500 )edit