Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Mach-O Linker(Id) Error #7

Closed
xqpinitial opened this issue Apr 14, 2017 · 7 comments
Closed

Apple Mach-O Linker(Id) Error #7

xqpinitial opened this issue Apr 14, 2017 · 7 comments

Comments

@xqpinitial
Copy link

apple Mach-O Linker(Id) Error
caffe::Timer::~Timer() referenced from
caffe::CPUTimer::Start() reference from
caffe::Net::Net(std::_1::basic_string<char,std::_1::char_traits>...)

the libcaffe.a and libproto.a have been getted in build/lib

@solrex
Copy link
Owner

solrex commented Apr 14, 2017

@xqpinitial Sorry. I cannot understand your problem. Could you please clean your env, try again and provide more information?

@xqpinitial
Copy link
Author

I'm soory i did't make it clear.
when i build caffe-mobile lib with cmake for Iphone,there is no problem for cmake and make -j4
however,when i start with xcode to build it by Command-R ,there is a error,Apple Mach-O Linker(Id) Error
03c5a8f3-a061-49c0-9d73-f2c35b29e64a

@solrex
Copy link
Owner

solrex commented Apr 14, 2017

@xqpinitial It seems like you build caffe-mobile for iPhone, but build CaffeSimple for iPhoneSimulator. Connect your iPhone to Xcode, select one of your "Devices" instead of "iOS Simulators", then Cmd+R. Have fun! ^_^

image

@xqpinitial
Copy link
Author

thanks for your answer,but ...i want to cry
2017-04-14 4 59 07

@solrex
Copy link
Owner

solrex commented Apr 14, 2017

@xqpinitial Right click on the first error, select "Reveal in log" menu. The whole log will be showed in the log message window. Normally this error is introduced by link to a libcaffe.a which is built for another architecture.

For example:

WRONG CASE1: You built CaffeSimple for iPhone, linked to a libcaffe.a(libprotobuf.a) for iPhoneSimulator:

image

WRONG CASE2: You built CaffeSimple for iPhoneSimulator, linked to a libcaffe.a(libprotobuf.a) for iPhone:

image

So please follow the instructions for different target in README.md STEP by STEP, if you don't know how to cleaning up your environment for different targets. It's really important.

@xqpinitial
Copy link
Author

Thank you for your patience,I have runing your demo on my mobile with noproblem. I'm sorry i have trouble you. I have never using mac and iphone ,three days ago i try to translate caffe to iphone,i study how to use mac and xcode for one day, and then learn your demo。Because I do not understand the foundation, and bring you the trouble, please also please understand

@solrex
Copy link
Owner

solrex commented Apr 14, 2017

@xqpinitial Never mind ^_^

@solrex solrex closed this as completed Apr 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants