@daikigoto0205 (cen tum)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

OpenCVとのリンクについて

解決したいこと

VScode(Macos)にてC++を用いてOpenCVを以下のようにインクルードしたところ、エラーが発生しました。もし解決策をご存知の方がいらっしゃればご教示いただけるとありがたいです。

#include <opencv2/opencv.hpp>
using namespace cv;
g++-11 -std=c++14 -O3 -fopenmp -I/opt/homebrew/Cellar/opencv/4.9.0_2/include/opencv4/ -L/opt/homebrew/Cellar/opencv/4.9.0_2/lib learning.cpp -o exe.learning -lopencv_core -lopencv_imgcodecs -lopencv_highgui

発生している問題・エラー

Undefined symbols for architecture arm64:
  "__ZN2cv6imreadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi", referenced from:
      __Z9loadImageRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in ccbgOnLw.o
  "__ZN2cv6imshowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11_InputArrayE", referenced from:
      _main in ccbgOnLw.o
ld: symbol(s) not found for architecture arm64
0 likes

1Answer

Macのアーキテクチャは arm64 ですか?
OpenCVをインストールした際の具体的な手順は覚えていますか?

0Like

Your answer might help someone💌