MAC OS X 10.10:make all ,issue:ld: symbol(s) not found for architecture x86_64
the same issue to the website:https://github.com/BVLC/caffe/issues/1725.And my caffe-master is the lasted .My OS is MAC OSX 10.10.and follow the installed guide document.but there is a problem about "ld: symbol(s) not found for architecture x86_64"。and the information is as the follow:
clang: warning: argument unused during compilation: '-pthread'
Undefined symbols for architecture x86_64:
"cv::imread(std::string const&, int)", referenced from:
caffe::WindowDataLayer
This thread might help you: https://groups.google.com/forum/#!topic/caffe-users/G7gj03A-JPw
I am also experiencing this issue, on OS X 10.10 with any version of protobuf (on current master).
In my environment, libstdc++ was NOT used at all for building anything, including opencv, glog, protobuf, and so on.
When doing make on CAFFE_ROOT, I get the same error as you; but using cmake (cd build && cmake .. && make) it works fine (I don't know why make on the root would fail while with cmake does not).
I am doubtful that the ordering of library linkings is correct (i.e. LDFLAG), since the following workaround which places libraries the unresolved symbols in front, is working:
$ LDFLAGS="`pkg-config --libs protobuf` `pkg-config --libs opencv`" make all
~~Additionally, in similar way, the following would be a workaround leading me to successfully matlab bindings (to build matcaffe)~~ Never mind. The correct way to build matcaffe is using cmake (cd build && cmake .. -DBUILD_matlab=ON).
I hope I can further investigate into this issue afterwards as well.
Thanks your words.But after that I did follow you ,there is the same error here.Could u tell me the detail step by step?And I type the line"$ DFLAGS="pkg-config --libs protobuf pkg-config --libs opencv" make all".and there is a error as :
-bash: -L/usr/local/Cellar/protobuf/2.6.1/lib: No such file or directory
But I have the file in this directory.
Is that mean my protobuf is not installed successful?
What should I do?