Ask Your Question

Revision history [back]

Can't able to run facerec_fisherface.cpp

Hi, I am new to OpenCV. I am working on gender classification, so i started with sample code. I was trying to execute of facerec_fisherfaces.cpp sample program in MinGW but unfortunately i am getting below error message. please help us to solve this.

C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x5c)
    : undefined reference to `cv::noArray()'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x6e)
    : undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xa7)
    : undefined reference to `cv::normalize(cv::_InputArray const&, cv::_OutputArray
     const&, double, double, int, int, cv::_InputArray const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xae)
    : undefined reference to `cv::noArray()'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xc0)
    : undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xf9)
    : undefined reference to `cv::normalize(cv::_InputArray const&, cv::_OutputArray
     const&, double, double, int, int, cv::_InputArray const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x10b
    ): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x11e
    ): undefined reference to `cv::Mat::copyTo(cv::_OutputArray const&) const'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x25e
    ): undefined reference to `cv::Exception::Exception(int, std::string const&, std
    ::string const&, std::string const&, int)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x26c
    ): undefined reference to `cv::error(cv::Exception const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x276
    ): undefined reference to `cv::Exception::~Exception()'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x37d
    ): undefined reference to `cv::imread(std::string const&, int)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x44d
    ): undefined reference to `cv::Exception::~Exception()'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x792
    ): undefined reference to `cv::Exception::Exception(int, std::string const&, std
    ::string const&, std::string const&, int)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x7a3
    ): undefined reference to `cv::error(cv::Exception const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x7b0
    ): undefined reference to `cv::Exception::~Exception()'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x8a6
    ): undefined reference to `cv::createFisherFaceRecognizer(int, double)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x8eb
    ): undefined reference to `cv::_InputArray::_InputArray(std::vector<cv::Mat, std
    ::allocator<cv::Mat> > const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x934
    ): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x96e
    ): undefined reference to `cv::format(char const*, ...)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x9ec
    ): undefined reference to `cv::Algorithm::getMat(std::string const&) const'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xa60
    ): undefined reference to `cv::Algorithm::getMat(std::string const&) const'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xad4
    ): undefined reference to `cv::Algorithm::getMat(std::string const&) const'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xb36
    ): undefined reference to `cv::Mat::reshape(int, int) const'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xb4f
    ): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xb80
    ): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xbc9
    ): undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&
    )'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xc4b
    ): undefined reference to `cv::Mat::reshape(int, int) const'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xc64
    ): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xc95
    ): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xcbf
    ): undefined reference to `cv::format(char const*, ...)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xce1
    ): undefined reference to `cv::imwrite(std::string const&, cv::_InputArray const
    &, std::vector<int, std::allocator<int> > const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xd5a
    ): undefined reference to `cv::format(char const*, ...)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xdec
    ): undefined reference to `cv::Mat::reshape(int, int) const'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xe05
    ): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xe50
    ): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xe69
    ): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xe8c
    ): undefined reference to `cv::applyColorMap(cv::_InputArray const&, cv::_Output
    Array const&, int)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xea7
    ): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xec7
    ): undefined reference to `cv::format(char const*, ...)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xedf
    ): undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&
    )'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xf14
    ): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xf45
    ): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xf76
    ): undefined reference to `cv::format(char const*, ...)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0xf98
    ): undefined reference to `cv::imwrite(std::string const&, cv::_InputArray const
    &, std::vector<int, std::allocator<int> > const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x108
    f): undefined reference to `cv::Mat::reshape(int, int) const'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x10a
    8): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x10c
    1): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x10d
    a): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x110
    9): undefined reference to `cv::subspaceProject(cv::_InputArray const&, cv::_Inp
    utArray const&, cv::_InputArray const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x112
    c): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x114
    5): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x115
    e): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x118
    d): undefined reference to `cv::subspaceReconstruct(cv::_InputArray const&, cv::
    _InputArray const&, cv::_InputArray const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x11c
    9): undefined reference to `cv::Mat::reshape(int, int) const'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x11e
    2): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x124
    8): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x126
    5): undefined reference to `cv::format(char const*, ...)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x127
    7): undefined reference to `cv::imshow(std::string const&, cv::_InputArray const
    &)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x12a
    0): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x12c
    e): undefined reference to `cv::format(char const*, ...)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x12e
    7): undefined reference to `cv::imwrite(std::string const&, cv::_InputArray cons
    t&, std::vector<int, std::allocator<int> > const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x136
    6): undefined reference to `cv::waitKey(int)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text+0x14e
    d): undefined reference to `cv::Exception::~Exception()'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text$_ZN2c
    v3MatC1ERKS0_[__ZN2cv3MatC1ERKS0_]+0x151): undefined reference to `cv::Mat::copy
    Size(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text$_ZN2c
    v3MatD1Ev[__ZN2cv3MatD1Ev]+0x2d): undefined reference to `cv::fastFree(void*)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text$_ZN2c
    v3MataSERKS0_[__ZN2cv3MataSERKS0_]+0x102): undefined reference to `cv::Mat::copy
    Size(cv::Mat const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text$_ZNK2
    cv3Mat3colEi[__ZNK2cv3Mat3colEi]+0x4b): undefined reference to `cv::Mat::Mat(cv:
    :Mat const&, cv::Range const&, cv::Range const&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text$_ZNK2
    cv3Mat5cloneEv[__ZNK2cv3Mat5cloneEv]+0x20): undefined reference to `cv::_OutputA
    rray::_OutputArray(cv::Mat&)'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text$_ZNK2
    cv3Mat5cloneEv[__ZNK2cv3Mat5cloneEv]+0x31): undefined reference to `cv::Mat::cop
    yTo(cv::_OutputArray const&) const'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text$_ZN2c
    v3Mat7releaseEv[__ZN2cv3Mat7releaseEv]+0x44): undefined reference to `cv::Mat::d
    eallocate()'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text$_ZN2c
    v11_InputArrayC1IiEERKSt6vectorIT_SaIS3_EE[__ZN2cv11_InputArrayC1IiEERKSt6vector
    IT_SaIS3_EE]+0xe): undefined reference to `vtable for cv::_InputArray'
    C:\Users\raja\AppData\Local\Temp\ccKzzFDw.o:facerec_fisherfaces.cpp:(.text$_ZN2c
    v3PtrINS_14FaceRecognizerEE7releaseEv[__ZN2cv3PtrINS_14FaceRecognizerEE7releaseE
    v]+0x52): undefined reference to `cv::fastFree(void*)'
    collect2.exe: error: ld returned 1 exit status