gpt4 book ai didi

ios - 集成 OpenCV 框架的架构 armv7 的 undefined symbol

转载 作者:可可西里 更新时间:2023-11-01 05:02:25 31 4
gpt4 key购买 nike

我在集成opencv2.framework时遇到了这个错误,谁能帮忙解决一下。我的 Xcode 版本是 4.5。

Undefined symbols for architecture armv7:
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
cv::Exception::Exception(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in opencv2(system.o)
cv::Exception::Exception(cv::Exception const&) in opencv2(system.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:
cv::Mat::create(int, int const*, int) in opencv2(matrix.o)
__ZN2cvL7setSizeERNS_3MatEiPKiPKmb in opencv2(matrix.o)
cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&) in opencv2(matrix.o)
cv::Mat::Mat(cv::Mat const&, cv::Range const*) in opencv2(matrix.o)
cv::Mat::diag(int) const in opencv2(matrix.o)
cv::Mat::Mat(_IplImage const*, bool) in opencv2(matrix.o)
cv::Mat::reserve(unsigned long) in opencv2(matrix.o)
...
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long)", referenced from:
cv::Mat::create(int, int const*, int) in opencv2(matrix.o)
__ZN2cvL7setSizeERNS_3MatEiPKiPKmb in opencv2(matrix.o)
cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&) in opencv2(matrix.o)
cv::Mat::Mat(cv::Mat const&, cv::Range const*) in opencv2(matrix.o)
cv::Mat::diag(int) const in opencv2(matrix.o)
cv::Mat::Mat(_IplImage const*, bool) in opencv2(matrix.o)
cv::Mat::reserve(unsigned long) in opencv2(matrix.o)
...
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
std::__1::vector<cv::Vec<int, 128>, std::__1::allocator<cv::Vec<int, 128> > >::__append(unsigned long) in opencv2(matrix.o)
std::__1::vector<cv::Vec<int, 64>, std::__1::allocator<cv::Vec<int, 64> > >::__append(unsigned long) in opencv2(matrix.o)
std::__1::vector<cv::Vec<int, 32>, std::__1::allocator<cv::Vec<int, 32> > >::__append(unsigned long) in opencv2(matrix.o)
std::__1::vector<cv::Vec<int, 16>, std::__1::allocator<cv::Vec<int, 16> > >::__append(unsigned long) in opencv2(matrix.o)
std::__1::vector<cv::Vec<int, 12>, std::__1::allocator<cv::Vec<int, 12> > >::__append(unsigned long) in opencv2(matrix.o)
std::__1::vector<cv::Vec<int, 9>, std::__1::allocator<cv::Vec<int, 9> > >::__append(unsigned long) in opencv2(matrix.o)
std::__1::vector<cv::Vec<int, 8>, std::__1::allocator<cv::Vec<int, 8> > >::__append(unsigned long) in opencv2(matrix.o)
...
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
cv::Exception::formatMessage() in opencv2(system.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

您只需要将"libc++.dylib" 添加到您的“链接框架和库”

关于ios - 集成 OpenCV 框架的架构 armv7 的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15196382/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com