Closed indianscorpion closed 10 months ago
If the CMake in the example works, then the issue would be in your code, no? You are likely not linking all the OpenCV libraries you need for your project.
I linked all the libraries in your release package as below, which one am I missing? -lnfiq2 -lFRFXLL_static -lopencv_core -lopencv_imgproc -lopencv_ml your lib64: libFRFXLL_static.a libnfiq2.a libnfir.a libopencv_imgproc.a libopencv_ml.a libopencv_core.a libNfiq2Api.so libFRFXLL.so
softdouble appears to be defined in core: https://docs.opencv.org/4.6.0/d7/dcc/group__core__utils__softfloat.html#gac2116f5bce2914d578953c6ac8c0da16
it is using CV_EXPORTS softdouble cos( const softdouble& a ); should I include any link options?
in /usr/local/nfiq2/include/opencv4/opencv2/core/softfloat.hpp
struct softfloat; struct softdouble;
struct CV_EXPORTS softfloat { public: /* @brief Default constructor / softfloat() { v = 0; }
struct CV_EXPORTS softdouble { public: /* @brief Default constructor / softdouble() : v(0) { } /* @brief Copy constructor / softdouble( const softdouble& c) { v = c.v; }
It's in opencv_core. You are likely not linking in an appropriate order. This is not an NFIQ 2 issue.
$ nm -C libopencv_core.a | grep 'T cv::softdouble::operator\*'
0000000000000000 T cv::softdouble::operator*(cv::softdouble const&) const
yes, the correct linking order is as below: -lnfiq2 -lFRFXLL_static -lopencv_ml -lopencv_imgproc -lopencv_core
Failed to link opencv using g++ on LINUX
Trying to link the library using g++ as below, it gave tons of errors. (cmake on examples works) -lnfiq2 -lFRFXLL_static -lopencv_core -lopencv_imgproc -lopencv_ml
errors: undefined reference to `cv::softdouble::operator*(cv::softdouble const&) const'