kyamagu / mexopencv

Collection and a development kit of matlab mex functions for OpenCV library
http://kyamagu.github.io/mexopencv
Other
659 stars 318 forks source link

error: LSVMDetector_.cpp:(.text+0x1ae): undefined reference to `cv::lsvm::LSVMDetector #434

Closed chenfsjz closed 5 years ago

chenfsjz commented 5 years ago

hi, when I compile the mexopencv v3.0.0 with opencv_contrib, there is the issue as below:

 /tmp/mex_111712642399060_26970/LSVMDetector_.o: In function `mexFunction':
LSVMDetector_.cpp:(.text+0x1ae): undefined reference to 
`cv::lsvm::LSVMDetector::create(std::vector<std::string, std::allocator<std::string> > const&, 
std::vector<std::string, std::allocator<std::string> > const&)'
LSVMDetector_.cpp:(.text+0x244): undefined reference to 
`cv::lsvm::LSVMDetector::create(std::vector<std::string, std::allocator<std::string> > const&, 
std::vector<std::string, std::allocator<std::string> > const&)'
collect2: error: ld returned 1 exit status
Dzhange commented 5 years ago

check if there is a "LSVMDetector()" in your src code?

chenfsjz commented 5 years ago

@Dzhange there is a "LSVMDetector_.cpp" in the folder ,

mexopencv/opencv_contrib/src/+cv/private 

and if I delete this file, the rest modules in opencv_contrib can be compiled successfully

amroamroamro commented 5 years ago

make sure you are using matching versions, v3.0.0, of opencv, opencv_contrib, and mexopencv

If you are still having problem, please include more info (OS, matlab, how you build/install opencv, build commands and options, versions, etc.)

Also refer to the wiki which contains detailed build instructions.