Unable to link opencv statically with my project

Hi, I am trying to statically link opencv with my project. I compiled opencv using cmake -DBUILD_SHARED_LIBS=OFF -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules/ ../opencv

output for same

-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- The C compiler identification is AppleClang 12.0.0.12000032
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detected processor: x86_64
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.16", minimum required is "2.7") 
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found suitable exact version "2.7.16") 
-- Found PythonInterp: /usr/local/bin/python3 (found suitable version "3.9", minimum required is "3.2") 
-- Found PythonLibs: /usr/local/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib (found suitable exact version "3.9.0") 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'numpy.distutils' has no attribute 'misc_util'
-- Looking for ccache - not found
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W

-- Check size of ptrdiff_t - done
-- Check size of INT8
-- Check size of INT8 - failed
-- Check size of INT16
-- Check size of INT16 - failed
-- Check size of INT32
-- Check size of INT32 - failed
-- Looking for floor
-- Looking for floor - found
-- Looking for pow
-- Looking for pow - found
-- Looking for sqrt
-- Looking for sqrt - found
-- Looking for isascii
-- Looking for isascii - found
-- Looking for memset
-- Looking for memset - found
-- Looking for mmap
-- Looking for mmap - found
-- Looking for getopt
-- Looking for getopt - found
-- Looking for memmove
-- Looking for memmove - found
-- Looking for setmode
-- Looking for setmode - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strchr
-- Looking for strchr - found
-- Looking for strrchr
-- Looking for strrchr - found
-- Looking for strstr
-- Looking for strstr - found
-- Looking for strtol
-- Looking for strtol - found
-- Looking for strtol
-- Looking for strtol - found
-- Looking for strtoull
-- Looking for strtoull - found
-- Looking for lfind
-- Looking for lfind - found
-- Performing Test HAVE_SNPRINTF
-- Performing Test HAVE_SNPRINTF - Success
-- Check if the system is big endian
-- Searching 16 bit integer
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE - Failed
-- Performing Test HAVE_C_WNO_UNUSED
-- Performing Test HAVE_C_WNO_UNUSED - Success
-- Performing Test HAVE_C_WNO_CAST_ALIGN
-- Performing Test HAVE_C_WNO_CAST_ALIGN - Success
-- Performing Test HAVE_C_WNO_SHADOW
-- Performing Test HAVE_C_WNO_SHADOW - Success
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED - Failed
-- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST
-- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST - Success
-- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST
-- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST - Success
-- Performing Test HAVE_C_WNO_MISLEADING_INDENTATION
-- Performing Test HAVE_C_WNO_MISLEADING_INDENTATION - Success
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_C_STD_C99
-- Performing Test HAVE_C_STD_C99 - Success
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE - Success
-- Performing Test HAVE_C_WNO_UNUSED_FUNCTION
-- Performing Test HAVE_C_WNO_UNUSED_FUNCTION - Success
-- Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1). OpenJPEG will be built from sources
-- Performing Test HAVE_C_WNO_IMPLICIT_CONST_INT_FLOAT_CONVERSION
-- Performing Test HAVE_C_WNO_IMPLICIT_CONST_INT_FLOAT_CONVERSION - Failed
-- OpenJPEG: VERSION = 2.3.1, BUILD = opencv-4.5.1-dev-openjp2-2.3.1
-- Check if the system is big endian
-- Searching 16 bit integer
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for stdio.h
-- Looking for stdio.h - found
-- Looking for math.h
-- Looking for math.h - found
-- Looking for float.h
-- Looking for float.h - found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for stdarg.h
-- Looking for stdarg.h - found
-- Looking for ctype.h
-- Looking for ctype.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for include file malloc.h
-- Looking for include file malloc.h - not found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - not found
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for memalign
-- Looking for memalign - not found
-- Performing Test HAVE_C_WNO_CAST_FUNCTION_TYPE
-- Performing Test HAVE_C_WNO_CAST_FUNCTION_TYPE - Failed
\
-- ADE: Download: v0.1.1f.zip
-- OpenCV Python: during development append to PYTHONPATH: /Users/akshayvashistha/Documents/font-featurevector-ubuntu-core/opencv/build/python_loader
-- Checking for modules 'libavcodec;libavformat;libavutil;libswscale'
--   Found libavcodec, version 58.91.100
--   Found libavformat, version 58.45.100
--   Found libavutil, version 56.51.100
--   Found libswscale, version 5.7.100
-- Checking for module 'libavresample'
--   Found libavresample, version 4.0.0
-- Checking for module 'gstreamer-base-1.0'
--   No package 'gstreamer-base-1.0' found
-- Checking for module 'gstreamer-app-1.0'
--   No package 'gstreamer-app-1.0' found
-- Checking for module 'gstreamer-riff-1.0'
--   No package 'gstreamer-riff-1.0' found
-- Checking for module 'gstreamer-pbutils-1.0'
--   No package 'gstreamer-pbutils-1.0' found
-- Checking for module 'libdc1394-2'
--   No package 'libdc1394-2' found
-- Caffe:   NO
-- Protobuf:   NO
-- Glog:   YES
-- Checking for module 'freetype2'
--   Found freetype2, version 23.4.17
-- Checking for module 'harfbuzz'
--   Found harfbuzz, version 2.7.2
-- freetype2:   YES (ver 23.4.17)
-- harfbuzz:    YES (ver 2.7.2)
-- Found HDF5: /usr/local/Cellar/hdf5/1.12.0_1/lib/libhdf5.dylib;/usr/local/opt/szip/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib (found version "1.12.0")  
-- Julia not found. Not compiling Julia Bindings. 
-- Module opencv_ovis disabled because OGRE3D was not found
-- Found installed version of Eigen: /usr/local/share/eigen3/cmake
-- Found required Ceres dependency: Eigen version 3.3.8 in /usr/local/include/eigen3
-- Found required Ceres dependency: glog
-- Found installed version of gflags: /usr/local/lib/cmake/gflags
-- Detected gflags version: 2.2.2
-- Found required Ceres dependency: gflags
-- Found Ceres version: 1.14.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations]
-- Found installed version of Eigen: /usr/local/share/eigen3/cmake
...........cess
-- 
-- General configuration for OpenCV 4.5.1-dev =====================================
--   Version control:               4.5.1-94-g7a790d0d35
-- 
--   Extra modules:
--     Location (extra):            /Users/akshayvashistha/Documents/font-featurevector-ubuntu-core/opencv/opencv_contrib/modules
--     Version control (extra):     4.5.1-14-gea1081cc
-- 
--   Platform:
--     Timestamp:                   2021-01-21T10:21:30Z
--     Host:                        Darwin 19.6.0 x86_64
--     CMake:                       3.19.1
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               Release
-- 
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3 SSSE3 SSE4_1
--       requested:                 DETECT
--     Dispatched code generation:  SSE4_2 FP16 AVX AVX2 AVX512_SKX
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       SSE4_2 (2 files):          + POPCNT SSE4_2
--       FP16 (1 files):            + POPCNT SSE4_2 FP16 AVX
--       AVX (5 files):             + POPCNT SSE4_2 AVX
--       AVX2 (31 files):           + POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--       AVX512_SKX (7 files):      + POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX
-- 
--   C/C++:
--     Built as dynamic libs?:      NO
--     C++ standard:                11
--     C++ Compiler:                /Library/Developer/CommandLineTools/usr/bin/c++  (ver 12.0.0.12000032)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /Library/Developer/CommandLineTools/usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,-dead_strip  
--     Linker flags (Debug):        -Wl,-dead_strip  
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          -framework OpenCL /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Accelerate.framework -lm -ldl ade -framework Cocoa -framework AppKit /usr/local/opt/freetype/lib/libfreetype.dylib /usr/local/Cellar/harfbuzz/2.7.2/lib/libharfbuzz.dylib /usr/local/Cellar/hdf5/1.12.0_1/lib/libhdf5.dylib /usr/local/opt/szip/lib/libsz.dylib /usr/lib/libz.dylib /usr/lib/libdl.dylib /usr/lib/libm.dylib ceres correspondence multiview numeric /usr/local/lib/libglog.dylib gflags_shared simple_pipeline
--     3rdparty dependencies:       ittnotify libprotobuf libjpeg-turbo libwebp libpng zlib libtiff libopenjp2 IlmImf quirc ippiw ippicv
-- 
--   OpenCV modules:
--     To be built:                 alphamat aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python2 quality rapid reg rgbd saliency sfm shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv java julia matlab ovis python3 viz
--     Applications:                tests perf_tests apps
--     Documentation:               NO
--     Non-free algorithms:         NO
-- 
--   GUI: 
--     Cocoa:                       YES
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        zlib (ver 1.2.11)
--     JPEG:                        build-libjpeg-turbo (ver 2.0.6-62)
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         libpng (ver 1.6.37)
--     TIFF:                        libtiff (ver 42 / 4.0.10)
--     JPEG 2000:                   build (ver 2.3.1)
--     OpenEXR:                     build (ver 2.3.0)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
-- 
--   Video I/O:
--     DC1394:                      NO
--     FFMPEG:                      YES
--       avcodec:                   YES (58.91.100)
--       avformat:                  YES (58.45.100)
--       avutil:                    YES (56.51.100)
--       swscale:                   YES (5.7.100)
--       avresample:                YES (4.0.0)
--     GStreamer:                   NO
--     AVFoundation:                YES
-- 
--   Parallel framework:            GCD
-- 
--   Trace:                         YES (with Intel ITT)
-- 
--   Other third-party libraries:
--     Intel IPP:                   2020.0.0 Gold [2020.0.0]
--            at:                   /Users/akshayvashistha/Documents/font-featurevector-ubuntu-core/opencv/build/3rdparty/ippicv/ippicv_mac/icv
--     Intel IPP IW:                sources (2020.0.0)
--               at:                /Users/akshayvashistha/Documents/font-featurevector-ubuntu-core/opencv/build/3rdparty/ippicv/ippicv_mac/iw
--     Lapack:                      YES (/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Accelerate.framework -lm -ldl)
--     Eigen:                       YES (ver 3.3.8)
--     Custom HAL:                  NO
--     Protobuf:                    build (3.5.1)
-- 
--   OpenCL:                        YES (no extra features)
--     Include path:                NO
--     Link libraries:              -framework OpenCL
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.16)
--     Libraries:                   /usr/lib/libpython2.7.dylib (ver 2.7.16)
--     numpy:                       /Users/akshayvashistha/Library/Python/2.7/lib/python/site-packages/numpy/core/include (ver 1.16.6)
--     install path:                lib/python2.7/site-packages/cv2/python-2.7
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:                          
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Install to:                    /usr/local
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/akshayvashistha/Documents/font-featurevector-ubuntu-core/opencv/build

I now copied the header files from /usr/local/include/opencv4 to project base directory opencv_dependency.

now if i execute
g++ -fPIC test.cpp -I./opencv_dependency/headers -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lopencv_highgui -Wall -std=c++11 -dynamiclib -o test.dylib

I am able to run it but the -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lopencv_highgui attached with test.dylib are ones present at /usr/local/opt/opencv/lib/.

I want to link it with static files generated in build/lib.
so I started to execute multiple commands from:
g++ -fPIC test.cpp -I./opencv_dependency/headers -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lopencv_highgui -Wall -std=c++11

to

g++ -fPIC test.cpp -I./opencv_dependency/headers -L./opencv/build_opencv/3rdparty/lib/ -L./opencv/build_opencv/lib/ -lade -lcorrespondence -lmultiview -lnumeric -lopencv_alphamat -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_calib3d -lopencv_ccalib -lopencv_core -lopencv_datasets -lopencv_dnn -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_features2d -lopencv_flann -lopencv_freetype -lopencv_fuzzy -lopencv_gapi -lopencv_gapi -lopencv_hdf -lopencv_hfs -lopencv_hfs -lopencv_highgui -lopencv_img_hash -lopencv_imgcodecs -lopencv_imgproc -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_ml -lopencv_objdetect -lopencv_optflow -lopencv_phase_unwrapping -lopencv_photo -lopencv_plot -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_sfm -lopencv_shape -lopencv_stereo -lopencv_stitching -lopencv_structured_light -lopencv_superres -lopencv_surface_matching -lopencv_text -lopencv_tracking -lopencv_ts -lopencv_video -lopencv_videoio -lopencv_videostab -lopencv_xfeatures2d -lopencv_ximgproc -lopencv_xobjdetect -lopencv_xphoto -lsimple_pipeline -lIlmImf -lippiw -Llittnotify opencv/build_opencv/3rdparty/lib/liblibjpeg-turbo.a -llibopenjp2 -llibpng -llibprotobuf -llibtiff -llibwebp -lquirc -lzlib -framework Accelerate -lade -lcorrespondence -lmultiview -lnumeric -lopencv_alphamat -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_calib3d -lopencv_ccalib -lopencv_core -lopencv_datasets -lopencv_dnn -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_features2d -lopencv_flann -lopencv_freetype -lopencv_fuzzy -lopencv_gapi -lopencv_gapi -lopencv_hdf -lopencv_hfs -lopencv_hfs -lopencv_highgui -lopencv_img_hash -lopencv_imgcodecs -lopencv_imgproc -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_ml -lopencv_objdetect -lopencv_optflow -lopencv_phase_unwrapping -lopencv_photo -lopencv_plot -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_sfm -lopencv_shape -lopencv_stereo -lopencv_stitching -lopencv_structured_light -lopencv_superres -lopencv_surface_matching -lopencv_text -lopencv_tracking -lopencv_ts -lopencv_video -lopencv_videoio -lopencv_videostab -lopencv_xfeatures2d -lopencv_ximgproc -lopencv_xobjdetect -lopencv_xphoto -lsimple_pipeline -Wall -std=c++11

but I am getting a lot of
ld: symbol(s) not found for architecture x86_64

      _llwiCopyMakeBorder in libippiw.a(iw_image_op_copy_make_border.c.o)
  "_ippicviCopyMirrorBorder_16u_C1R_L", referenced from:
      _llwiCopyMakeBorder in libippiw.a(iw_image_op_copy_make_border.c.o)
  "_ippicviCopyMirrorBorder_16u_C3IR_L", referenced from:
      _llwiCopyMakeBorder in libippiw.a(iw_image_op_copy_make_border.c.o)
  .........
      cv::hal::max64f(double const*, unsigned long, double const*, unsigned long, double*, unsigned long, int, int, void*) in libopencv_core.a(arithm.dispatch.cpp.o)
  "_ippicvsMaxEvery_8u", referenced from:
      cv::hal::max8u(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, int, int, void*) in libopencv_core.a(arithm.dispatch.cpp.o)
  "_ippicvsMinEvery_16u", referenced from:
      cv::hal::min16u(unsigned short const*, unsigned long, unsigned short const*, unsigned long, unsigned short*, unsigned long, int, int, void*) in libopencv_core.a(arithm.dispatch.cpp.o)
  "_ippicvsMinEvery_32f", referenced from:
      cv::hal::min32f(float const*, unsigned long, float const*, unsigned long, float*, unsigned long, int, int, void*) in libopencv_core.a(arithm.dispatch.cpp.o)
  "_ippicvsMinEvery_64f", referenced from:
      cv::hal::min64f(double const*, unsigned long, double const*, unsigned long, double*, unsigned long, int, int, void*) in libopencv_core.a(arithm.dispatch.cpp.o)
  "_ippicvsMinEvery_8u", referenced from:
      cv::hal::min8u(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, int, int, void*) in libopencv_core.a(arithm.dispatch.cpp.o)
  "_ippicvsPolarToCart_32f", referenced from:
      cv::polarToCart(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, bool) in libopencv_core.a(mathfuncs.cpp.o)
  "_ippicvsPolarToCart_64f", referenced from:
      cv::polarToCart(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, bool) in libopencv_core.a(mathfuncs.cpp.o)
  "_ippicvsRound_64f", referenced from:
      _iwValueSaturate in libippiw.a(iw_core.c.o)
      _ownCastArray_64f8u in libippiw.a(iw_image_transform_resize.c.o)
      _ownCastArray_64f16u in libippiw.a(iw_image_transform_resize.c.o)
      _ownCastArray_64f16s in libippiw.a(iw_image_transform_resize.c.o)
      _llwiSetMask in libippiw.a(iw_image_op_set.c.o)
      _llwiSet in libippiw.a(iw_image_op_set.c.o)
      _llwiSetUniform in libippiw.a(iw_image_op_set.c.o)
      ...
  "_ippicvsZero_8u", referenced from:
      _iwiTilePipeline_Init in libippiw.a(iw_image.c.o)
      _iwiTilePipeline_InitChild in libippiw.a(iw_image.c.o)
      _llwiResize_InitAlloc in libippiw.a(iw_image_transform_resize.c.o)
      _iwiWarpAffine_InitAlloc in libippiw.a(iw_image_transform_warpaffine.c.o)
ld: symbol(s) not found for architecture x86_64

I am using 4 fns of opencv imread, cvtColor, threshold, distanceTransform.