小编mbP*_*Pro的帖子

g ++ ld:找不到架构x86_64的符号

我正在尝试编译Sam Hare的Struck代码.

我使用的是mac OSX10.9,opencv 2.4.6和Eigen 2.0.17.

Eigen和opencv头存储在/ opt/local/include中,而opencv dylib存储在/ opt/local/lib中.

我修改了Hare的Makefile来处理这个文件夹.当我在终端上输入make时:

g++ -L/opt/local/lib -lopencv_core -lopencv_highgui -lopencv_imgproc src/Config.o src/Features.o src/HaarFeature.o src/HaarFeatures.o src/HistogramFeatures.o src/ImageRep.o src/LaRank.o src/MultiFeatures.o src/RawFeatures.o src/Sampler.o src/Tracker.o src/main.o src/GraphUtils/GraphUtils.o -o struck
Run Code Online (Sandbox Code Playgroud)

我收到这些错误:

Undefined symbols for architecture x86_64:  
"cv::namedWindow(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
int)", referenced from:
      _main in main.o   "cv::split(cv::Mat const&, std::__1::vector<cv::Mat, std::__1::allocator<cv::Mat> >&)",
referenced from:
      ImageRep::ImageRep(cv::Mat const&, bool, bool, bool) in ImageRep.o   "cv::imread(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
int)", referenced from:
      _main in main.o   "cv::imshow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, …
Run Code Online (Sandbox Code Playgroud)

c++ gcc opencv

35
推荐指数
2
解决办法
11万
查看次数

标签 统计

c++ ×1

gcc ×1

opencv ×1