caffe之mac环境下通过XCode调试C++程序

caffe log输出参考:http://blog.csdn.net/langb2014/article/details/50482150mac下用xcode开发caffe:http://coldmooon.github.io/2015/08/14/compile_caffe_cpp/Xcode编译Undefined symbols for architecture xxx 错误总结:https://my.oschina.net/ioslighter/blog/363211Xcode, 给项目添加framework:http://www.cnblogs.com/SeeMeFly/archive/2011/09/09/2172688.html1.飞哥给的一些参考:http://blog.csdn.net/roland_sun/article/details/504526462. 飞哥给的一些参考:http://blog.csdn.net/koupoo/article/details/6872678

还没成功

问题:

LOG(ERROR) 可以正常打印信息。

LOG(INFO) 不起作用。

解决办法:

添加此句: FLAGS_alsologtostderr =1

然后先看一下是怎么加输出到日志,

#高性能矩阵计算,数值运算库  
brew install openblas  
#不加可能不会在/usr/local/include(bin) 中创建openblas的link,导致查找不到cblas.h的错误  
brew link openblas --force

一、C++ Standard Library

二、Build Settings/ Other Linker Flags添加:-lboost_system

Undefined symbols for architecture x86_64:
  "boost::system::system_category()", referenced from:
      ___cxx_global_var_init.2 in main.o
  "boost::system::generic_category()", referenced from:
      ___cxx_global_var_init in main.o
      ___cxx_global_var_init.1 in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

三、未解决

Undefined symbols for architecture x86_64:
  "caffe::Net<float>::Net(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, caffe::Phase, int, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const*, caffe::Net<float> const*)", referenced from:
      Classifier::Classifier(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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

原文链接: https://www.cnblogs.com/alanfang/p/6550107.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/250810

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月14日 上午4:48
下一篇 2023年2月14日 上午4:48

相关推荐