0

I want to run the project Objectness, Main.cpp. The code I download from website. I just use C++ again after about 5 years.

I have errors 'unresolved external symbol'. I read a related problem 'Unresolved external symbol in object files'.enter image description here

So I found these external symbols are already defined in Objectness.cpp.

The exactly error are

1>  Touching "x64\Debug\Objectness.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>ManifestResourceCompile:
1>  All outputs are up-to-date.
1>Objectness.obj : error LNK2019: unresolved external symbol destroy_param referenced in function "public: static class cv::Mat __cdecl Objectness::trainSVM(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &,int,double,double,double)" (?trainSVM@Objectness@@SA?AVMat@cv@@AEBV23@AEBV?$vector@HV?$allocator@H@std@@@std@@HNNN@Z)
1>Objectness.obj : error LNK2019: unresolved external symbol free_and_destroy_model referenced in function "public: static class cv::Mat __cdecl Objectness::trainSVM(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &,int,double,double,double)" (?trainSVM@Objectness@@SA?AVMat@cv@@AEBV23@AEBV?$vector@HV?$allocator@H@std@@@std@@HNNN@Z)
1>Objectness.obj : error LNK2019: unresolved external symbol train referenced in function "public: static class cv::Mat __cdecl Objectness::trainSVM(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &,int,double,double,double)" (?trainSVM@Objectness@@SA?AVMat@cv@@AEBV23@AEBV?$vector@HV?$allocator@H@std@@@std@@HNNN@Z)
1>Objectness.obj : error LNK2019: unresolved external symbol check_parameter referenced in function "public: static class cv::Mat __cdecl Objectness::trainSVM(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &,int,double,double,double)" (?trainSVM@Objectness@@SA?AVMat@cv@@AEBV23@AEBV?$vector@HV?$allocator@H@std@@@std@@HNNN@Z)
1>Objectness.obj : error LNK2019: unresolved external symbol set_print_string_function referenced in function "public: static class cv::Mat __cdecl Objectness::trainSVM(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &,int,double,double,double)" (?trainSVM@Objectness@@SA?AVMat@cv@@AEBV23@AEBV?$vector@HV?$allocator@H@std@@@std@@HNNN@Z)

Could anyone tell me how to solve this problem? Thanks in advance!

Community
  • 1
  • 1
Vivian
  • 207
  • 1
  • 3
  • 11
  • 3
    'unresolved external symbol' is a *linker* problem. you're missing libs. – berak Aug 06 '14 at 09:21
  • @berak, thanks for your comment. The 'unresolved external symbol' are defined in the `Objectness.cpp`. – Vivian Aug 06 '14 at 09:38
  • what if you add the *exact* error msg above ? – berak Aug 06 '14 at 09:39
  • @berak, sorry.They are definedin `Objectness.cpp`. – Vivian Aug 06 '14 at 09:45
  • +1 for the addition. the missing functions don't look like opencv ones, i'd suspect now, that you forgot to add some cpp file containing them to your project. – berak Aug 06 '14 at 09:48
  • @berak,thank you for your comment. Those unresolved external symbol are defined in `Objectness.cpp`. And `Objectness.cpp` is in the folder `Objectness`. Please see the picture in my poster. So if this file is in the current folder, why it cannot find the definition? – Vivian Aug 06 '14 at 09:52

0 Answers0