MultiversX Tracker is Live!

Adding dependency to Bitcoin core

Bitcoin Stack Exchange

Bitcoin News / Bitcoin Stack Exchange 173 Views

I want to include opencv library in bitcoin core.

I created the depends/packages/opencv.mk file and added them.

package=opencv $(package)_version=70bbf17b133496bd7d54d034b0f94bd869e0e810 $(package)_download_path=https://github.com/opencv/opencv/archive $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=74e2250fcac2a51996be85f46e2aac386e31b4faaf6a9aa6bae94d0fbb4102e7 $(package)_build_subdir=build

define $(package)_preprocess_cmds mkdir build endef

define $(package)_config_cmds $($(package)_cmake) -DCMAKE_C_FLAGS="$$($(1)_cflags) -Wl,--build-id=none" -DCMAKE_SKIP_RPATH="ON" -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" -DCMAKE_CXX_FLAGS="$$($(1)_cxxflags) -std=c++14" -DBUILD_opencv_flann=OFF -DBUILD_opencv_ml=OFF -DBUILD_opencv_video=OFF -DBUILD_opencv_shape=OFF -DBUILD_opencv_videoio=OFF -DBUILD_opencv_highgui=OFF -DBUILD_opencv_objdetect=OFF -DBUILD_opencv_superres=OFF -DBUILD_opencv_ts=OFF -DBUILD_opencv_features2d=OFF -DBUILD_opencv_calib3d=OFF -DBUILD_opencv_stitching=OFF -DBUILD_opencv_videostab=OFF -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF DBUILD_STATIC_LIBS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. endef

define $(package)_build_cmds $(MAKE) endef

define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef

I also added the library in depends/packages/packages.mk file.

packages:=boost libevent opencv

In src/Makefile.am I added:

LIBS += -lopencv_imgcodecs -lopencv_imgproc -lopencv_core -lopencv_photo

but ld throws too many "undefined reference" errors and won't compile. Where am I doing wrong?


Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments