Project-10 / DGM

Direct Graphical Models (DGM) C++ library, a cross-platform Conditional Random Fields library, which is optimized for parallel computing and includes modules for feature extraction, classification and visualization.
http://research.project-10.de/dgm/
Other
188 stars 41 forks source link

Build error #22

Closed lucasjinreal closed 5 years ago

lucasjinreal commented 5 years ago

With Ubuntu 18.04, OpenCV 3.3

CMakeFiles/Demo_FEX.dir/Demo_FEX.cpp.o: In function `main':
Demo FEX.cpp:(.text+0xf8): undefined reference to `DirectGraphicalModels::fex::CCoordinate::get(cv::Mat const&, DirectGraphicalModels::fex::coordinateType)'
Demo FEX.cpp:(.text+0x231): undefined reference to `DirectGraphicalModels::fex::CCommonFeatureExtractor::invert() const'
CMakeFiles/Demo_FEX.dir/Demo_FEX.cpp.o: In function `DirectGraphicalModels::fex::CCommonFeatureExtractor::getIntensity(cv::Scalar_<double>) const':
Demo FEX.cpp:(.text._ZNK21DirectGraphicalModels3fex23CCommonFeatureExtractor12getIntensityEN2cv7Scalar_IdEE[_ZNK21DirectGraphicalModels3fex23CCommonFeatureExtractor12getIntensityEN2cv7Scalar_IdEE]+0x66): undefined reference to `DirectGraphicalModels::fex::CIntensity::get(cv::Mat const&, cv::Scalar_<double>)'
CMakeFiles/Demo_FEX.dir/Demo_FEX.cpp.o: In function `DirectGraphicalModels::fex::CCommonFeatureExtractor::getSaturation() const':
Demo FEX.cpp:(.text._ZNK21DirectGraphicalModels3fex23CCommonFeatureExtractor13getSaturationEv[_ZNK21DirectGraphicalModels3fex23CCommonFeatureExtractor13getSaturationEv]+0x42): undefined reference to `DirectGraphicalModels::fex::CHSV::get(cv::Mat const&)'
Demo FEX.cpp:(.text._ZNK21DirectGraphicalModels3fex23CCommonFeatureExtractor13getSaturationEv[_ZNK21DirectGraphicalModels3fex23CCommonFeatureExtractor13getSaturationEv]+0x73): undefined reference to `DirectGraphicalModels::fex::CCommonFeatureExtractor::getChannel(int) const'
CMakeFiles/Demo_FEX.dir/Demo_FEX.cpp.o: In function `DirectGraphicalModels::fex::CCommonFeatureExtractor::getNDVI(unsigned char) const':
Demo FEX.cpp:(.text._ZNK21DirectGraphicalModels3fex23CCommonFeatureExtractor7getNDVIEh[_ZNK21DirectGraphicalModels3fex23CCommonFeatureExtractor7getNDVIEh]+0x4e): undefined reference to `DirectGraphicalModels::fex::CNDVI::get(cv::Mat const&, unsigned char)'
CMakeFiles/Demo_FEX.dir/Demo_FEX.cpp.o: In function `DirectGraphicalModels::fex::CCommonFeatureExtractor::getVariance(DirectGraphicalModels::fex::SqNeighbourhood) const':
Demo FEX.cpp:(.text._ZNK21DirectGraphicalModels3fex23CCommonFeatureExtractor11getVarianceENS0_15SqNeighbourhoodE[_ZNK21DirectGraphicalModels3fex23CCommonFeatureExtractor11getVarianceENS0_15SqNeighbourhoodE]+0x5b): undefined reference to `DirectGraphicalModels::fex::CVariance::get(cv::Mat const&, DirectGraphicalModels::fex::SqNeighbourhood)'
collect2: error: ld returned 1 exit status
demos/CMakeFiles/Demo_FEX.dir/build.make:91: recipe for target 'bin/Demo Feature Extraction' failed
make[2]: *** [bin/Demo Feature Extraction] Error 1
CMakeFiles/Makefile2:513: recipe for target 'demos/CMakeFiles/Demo_FEX.dir/all' failed
make[1]: *** [demos/CMakeFiles/Demo_FEX.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
ereator commented 5 years ago

Hi @jinfagang Did you follow the instructions from that post DGM for Ubuntu ? In particular did you use the following string for CMake? cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local

lucasjinreal commented 5 years ago

@ereator I tried, but nothing help with trigger the release option

ereator commented 5 years ago

@jinfagang I have tested with Ubuntu 18.04, OpenCV 3.3.0 and the latest DGM 1.7.0 from master and can't reproduce the error.

ereator commented 5 years ago

Hi @jinfagang, starting from the release 1.7.0 the DGM library officially supports Linux. In particular it was tested with Ubuntu 18.04 and gcc 7.3.0. Please refer to the Installation Guide for more details.