uricamic / clandmark

Open Source Landmarking Library
http://cmp.felk.cvut.cz/~uricamic/clandmark
GNU General Public License v3.0
199 stars 111 forks source link

some error in building clandmark in visual studio #34

Closed hurricanemad closed 8 years ago

hurricanemad commented 8 years ago

Hi, uricamic. I try to build the clandmark in vs2012 and vs2013. I've compiled the source code in CMake and added the opencv path. However, when I build the clandmark, there is the only .dll file. Then, I add the .def file and get the lib. But some error appear, there is the error: 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::XmlNode::~XmlNode(void)" (??1XmlNode@clandmark@@QAE@XZ) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: class clandmark::XmlNode thiscall clandmark::XmlNode::operator" (??AXmlNode@clandmark@@QAE?AV01@PBD@Z) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: class std::vector > thiscall clandmark::XmlNode::getSet(char const *)" (?getSet@XmlNode@clandmark@@QAE?AV?$vector@VXmlNode@clandmark@@V?$allocator@VXmlNode@clandmark@@@std@@@std@@PBD@Z) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: unsigned char * __thiscall clandmark::XmlNode::readRaw(int )" (?readRaw@XmlNode@clandmark@@QAEPAEPAH@Z) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::XmlNode::operator int(void)" (??BXmlNode@clandmark@@QAEHXZ) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::XmlNode::operator double(void)" (??BXmlNode@clandmark@@QAENXZ) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const *,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: __thiscall clandmark::XmlNode::operator class std::basic_string,class std::allocator >(void)" (??BXmlNode@clandmark@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: __thiscall clandmark::XmlStorage::XmlStorage(class std::basic_string,class std::allocator >,enum clandmark::FILE_TYPE)" (??0XmlStorage@clandmark@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4FILE_TYPE@1@@Z) referenced in function "public: __thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::XmlStorage::~XmlStorage(void)" (??1XmlStorage@clandmark@@QAE@XZ) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: class clandmark::XmlNode thiscall clandmark::XmlStorage::operator" (??AXmlStorage@clandmark@@QAE?AVXmlNode@1@PBD@Z) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::CLandmark::CLandmark(int,int,int,int,double,double)" (??0CLandmark@clandmark@@QAE@HHHHNN@Z) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(int,int,int,int,double,double)" (??0Flandmark@clandmark@@QAE@HHHHNN@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::CLandmark::CLandmark(void)" (??0CLandmark@clandmark@@QAE@XZ) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: void thiscall clandmark::CLandmark::init(int,int,int,int,double,double)" (?init@CLandmark@clandmark@@QAEXHHHHNN@Z) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(char const ,bool)" (??0Flandmark@clandmark@@QAE@PBD_N@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: virtual thiscall clandmark::CLandmark::~CLandmark(void)" (??1CLandmark@clandmark@@UAE@XZ) referenced in function catch$?getInstanceOf@Flandmark@clandmark@@SAPAV12@PBD_N@Z$0 3>Flandmark.obj : error LNK2019: unresolved external symbol "public: void thiscall clandmark::CLandmark::computeWdimension(void)" (?computeWdimension@CLandmark@clandmark@@QAEXXZ) referenced in function "public: thiscall clandmark::Flandmark::Flandmark(int,int,int,int,double,double)" (??0Flandmark@clandmark@@QAE@HHHHNN@Z) 3>Flandmark.obj : error LNK2019: unresolved external symbol "protected: void thiscall clandmark::CLandmark::setGroundTruth(double *)" (?setGroundTruth@CLandmark@clandmark@@IAEXPAN@Z) referenced in function catch$?getInstanceOf@Flandmark@clandmark@@SAPAV12@PBD_N@Z$0 3>Flandmark.obj : error LNK2019: unresolved external symbol "protected: void thiscall clandmark::CLandmark::getNormalizedFrame(struct cimg_library::CImg ,int )" (?getNormalizedFrame@CLandmark@clandmark@@IAEXPAU?$CImg@E@cimg_library@@PAH@Z) referenced in function catch$?getInstanceOf@Flandmark@clandmark@@SAPAV12@PBD_N@Z$0 3>CSparseLBPFeatures.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::CFeatures::CFeatures(int,int,int,int *)" (??0CFeatures@clandmark@@QAE@HHHPAH@Z) referenced in function "public: thiscall clandmark::CSparseLBPFeatures::CSparseLBPFeatures(int,int,int,int )" (??0CSparseLBPFeatures@clandmark@@QAE@HHHPAH@Z) 3>CSparseLBPFeatures.obj : error LNK2019: unresolved external symbol "public: virtual thiscall clandmark::CFeatures::~CFeatures(void)" (??1CFeatures@clandmark@@UAE@XZ) referenced in function "public: virtual thiscall clandmark::CSparseLBPFeatures::~CSparseLBPFeatures(void)" (??1CSparseLBPFeatures@clandmark@@UAE@XZ) 3>CSparseLBPAppearanceModel.obj : error LNK2019: unresolved external symbol "public: void __thiscall clandmark::XmlStorage::writeRaw(void const ,int)" (?writeRaw@XmlStorage@clandmark@@QAEXPBXH@Z) referenced in function "public: virtual void thiscall clandmark::CSparseLBPAppearanceModel::write(class clandmark::XmlStorage &,double * const,bool)const " (?write@CSparseLBPAppearanceModel@clandmark@@UBEXAAVXmlStorage@2@QAN_N@Z) 3>CDisplacementDeformationCost.obj : error LNK2001: unresolved external symbol "public: void thiscall clandmark::XmlStorage::writeRaw(void const *,int)" (?writeRaw@XmlStorage@clandmark@@QAEXPBXH@Z) 3>CSparseLBPAppearanceModel.obj : error LNK2019: unresolved external symbol "class clandmark::XmlStorage & cdecl clandmark::operator<<(class clandmark::XmlStorage &,class std::basic_string,class std::allocator > const &)" (??6clandmark@@YAAAVXmlStorage@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: virtual void thiscall clandmark::CSparseLBPAppearanceModel::write(class clandmark::XmlStorage &,double * const,bool)const " (?write@CSparseLBPAppearanceModel@clandmark@@UBEXAAVXmlStorage@2@QAN_N@Z) 3>CDisplacementDeformationCost.obj : error LNK2001: unresolved external symbol "class clandmark::XmlStorage & cdecl clandmark::operator<<(class clandmark::XmlStorage &,class std::basic_string,class std::allocator > const &)" (??6clandmark@@YAAAVXmlStorage@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 3>CSparseLBPAppearanceModel.obj : error LNK2019: unresolved external symbol "class clandmark::XmlStorage & cdecl clandmark::operator<<(class clandmark::XmlStorage &,int const &)" (??6clandmark@@YAAAVXmlStorage@0@AAV10@ABH@Z) referenced in function "public: virtual void thiscall clandmark::CSparseLBPAppearanceModel::write(class clandmark::XmlStorage &,double * const,bool)const " (?write@CSparseLBPAppearanceModel@clandmark@@UBEXAAVXmlStorage@2@QAN_N@Z) 3>CDisplacementDeformationCost.obj : error LNK2001: unresolved external symbol "class clandmark::XmlStorage & cdecl clandmark::operator<<(class clandmark::XmlStorage &,int const &)" (??6clandmark@@YAAAVXmlStorage@0@AAV10@ABH@Z) 3>CSparseLBPAppearanceModel.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::CAppearanceModel::CAppearanceModel(int,int,int,int,int,int,int,class clandmark::CLoss *)" (??0CAppearanceModel@clandmark@@QAE@HHHHHHHPAVCLoss@1@@Z) referenced in function "public: thiscall clandmark::CSparseLBPAppearanceModel::CSparseLBPAppearanceModel(int,int,int,int,int,int,int,int,class clandmark::CLoss )" (??0CSparseLBPAppearanceModel@clandmark@@QAE@HHHHHHHHPAVCLoss@1@@Z) 3>CSparseLBPAppearanceModel.obj : error LNK2019: unresolved external symbol "public: virtual thiscall clandmark::CAppearanceModel::~CAppearanceModel(void)" (??1CAppearanceModel@clandmark@@UAE@XZ) referenced in function "public: virtual thiscall clandmark::CSparseLBPAppearanceModel::~CSparseLBPAppearanceModel(void)" (??1CSparseLBPAppearanceModel@clandmark@@UAE@XZ) 3>CDisplacementDeformationCost.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::CDeformationCost::CDeformationCost(class clandmark::CAppearanceModel * const,class clandmark::CAppearanceModel * const,class clandmark::CLoss * const)" (??0CDeformationCost@clandmark@@QAE@QAVCAppearanceModel@1@0QAVCLoss@1@@Z) referenced in function "public: thiscall clandmark::CDisplacementDeformationCost::CDisplacementDeformationCost(class clandmark::CAppearanceModel * const,class clandmark::CAppearanceModel * const,int)" (??0CDisplacementDeformationCost@clandmark@@QAE@QAVCAppearanceModel@1@0H@Z) 3>CDisplacementDeformationCost.obj : error LNK2019: unresolved external symbol "public: virtual thiscall clandmark::CDeformationCost::~CDeformationCost(void)" (??1CDeformationCost@clandmark@@UAE@XZ) referenced in function "public: virtual thiscall clandmark::CDisplacementDeformationCost::~CDisplacementDeformationCost(void)" (??1CDisplacementDeformationCost@clandmark@@UAE@XZ) 3>CNormalizedEuclideanLoss.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::CLoss::CLoss(int,int)" (??0CLoss@clandmark@@QAE@HH@Z) referenced in function "public: thiscall clandmark::CNormalizedEuclideanLoss::CNormalizedEuclideanLoss(int,int)" (??0CNormalizedEuclideanLoss@clandmark@@QAE@HH@Z) 3>CTableLoss.obj : error LNK2001: unresolved external symbol "public: thiscall clandmark::CLoss::CLoss(int,int)" (??0CLoss@clandmark@@QAE@HH@Z) 3>CZeroLoss.obj : error LNK2001: unresolved external symbol "public: thiscall clandmark::CLoss::CLoss(int,int)" (??0CLoss@clandmark@@QAE@HH@Z) 3>CNormalizedEuclideanLoss.obj : error LNK2019: unresolved external symbol "public: virtual thiscall clandmark::CLoss::~CLoss(void)" (??1CLoss@clandmark@@UAE@XZ) referenced in function "public: virtual thiscall clandmark::CNormalizedEuclideanLoss::~CNormalizedEuclideanLoss(void)" (??1CNormalizedEuclideanLoss@clandmark@@UAE@XZ) 3>CTableLoss.obj : error LNK2001: unresolved external symbol "public: virtual thiscall clandmark::CLoss::~CLoss(void)" (??1CLoss@clandmark@@UAE@XZ) 3>CZeroLoss.obj : error LNK2001: unresolved external symbol "public: virtual thiscall clandmark::CLoss::~CLoss(void)" (??1CLoss@clandmark@@UAE@XZ) 3>CTreeMaxSumSolver.obj : error LNK2019: unresolved external symbol "public: thiscall clandmark::CMaxSumSolver::CMaxSumSolver(class std::vector > * const,class std::vector > * const,int,int)" (??0CMaxSumSolver@clandmark@@QAE@QAV?$vector@VVertex@clandmark@@V?$allocator@VVertex@clandmark@@@std@@@std@@QAV?$vector@PAVCDeformationCost@clandmark@@V?$allocator@PAVCDeformationCost@clandmark@@@std@@@3@HH@Z) referenced in function "public: thiscall clandmark::CTreeMaxSumSolver::CTreeMaxSumSolver(class std::vector > * const,class std::vector > \ const,int,int)" (??0CTreeMaxSumSolver@clandmark@@QAE@QAV?$vector@VVertex@clandmark@@V?$allocator@VVertex@clandmark@@@std@@@std@@QAV?$vector@PAVCDeformationCost@clandmark@@V?$allocator@PAVCDeformationCost@clandmark@@@std@@@3@HH@Z) 3>CTreeMaxSumSolver.obj : error LNK2019: unresolved external symbol "public: virtual thiscall clandmark::CMaxSumSolver::~CMaxSumSolver(void)" (??1CMaxSumSolver@clandmark@@UAE@XZ) referenced in function "public: virtual thiscall clandmark::CTreeMaxSumSolver::~CTreeMaxSumSolver(void)" (??1CTreeMaxSumSolver@clandmark@@UAE@XZ) 3>D:\Program Files\clandmark\myclandmark\libclandmark\Debug\flandmark.dll : fatal error LNK1120: 30 unresolved externals

Can you help me?

uricamic commented 8 years ago

Hi @hurricanemad,

it is not clear when this error appeared. You say that you have compiled the CLandmark successfully and have both .dll and .lib files. So, is this error result of compiling the enclosed examples or your own code using the library?

Btw if the library is compiled successfully, you should have files clandmark.dll and flandmark.dl in your build directory.

hurricanemad commented 8 years ago

I'm appreciate your repling my messege,When I compile the CLandmark (no All_Build and flandmark)in visual studio 2012,2013, there is only .dll and no .lib in build directory. Then I add the arbitrary .def file in CLandmark directory. The .lib file comes out. However, when I build the flandmark. The error listed int the first message occur. fatal error LNK1120: 30 unresolved externals. You feel me,uricamic?

uricamic commented 8 years ago

So, you have compiled the clandmark target only and when trying to compile flandmark, you got this message, right?

hurricanemad commented 8 years ago

yeah, what's up? Some error in Rapidxml? or other error?

uricamic commented 8 years ago

Unless you are using a different version than the one distributed with CLandmark, I guess not. I think the problem is with the compilation in visual studio.

Have you checked the screenshots for the compilation on the project webpages? For example to produce the libs, you should change the variable in CMake (BUILD_SHARED_LIBS=OFF). I don't have access to the computer with windows now, so I cannot really check what is the problem.

hurricanemad commented 8 years ago

Do the flandmark in CLandmark need mex compilier. I will compilier the Clandmark next day. I will cut out the screenshot of my building process and send the message to you. Could I know your e-mail?

uricamic commented 8 years ago

flandmark does not need mex compiler, only MATLAB interface does (and it also need both clandmark and flandmark statically compiled). My email is uricar.michal@gmail.com

hurricanemad commented 8 years ago

OK. I appreciate your help very much .

uricamic commented 8 years ago

no problem

hurricanemad commented 8 years ago

I solve the problem. We must check the BUILD_SHARED_LIBS option in CMake to insure building the cLandmark statically.Pay more attention to this.