KleinYuan / Caffe2-iOS

Caffe2 on iOS Real-time Demo. Test with Your Own Model and Photos.
MIT License
227 stars 45 forks source link

#include "caffe2/proto/caffe2.pb.h" not found (version 2) #23

Closed varunlakshmanan closed 6 years ago

varunlakshmanan commented 6 years ago

I know this issue has been encountered before, but the solutions provided there did not help me solve this problem. The error is occurring in the logging.h. file. I have a feeling the problem comes from when I ran setup.sh. I encountered numerous warnings and errors in Terminal when running setup.sh (This Imgur album has three images that show all of the errors and warnings. They are in chronological order from first image to third image.) For convenience, the three images are below as well.

screen shot 2017-12-24 at 11 58 47 am screen shot 2017-12-24 at 11 59 16 am screen shot 2017-12-24 at 12 01 15 pm

Click on the third image to enlarge it.

@KleinYuan Please let me know if you find a solution to this error.

varunlakshmanan commented 6 years ago

I was able to solve my problem by building Caffe2 on Windows, then transferring the files from the Windows build to the proto folder of the iOS installation. The error doesn't disappear even once the files are transferred, so you have to type in the absolute path of the files in the include/import statement, like this:

include "/Users/admin/Desktop/Caffe2-iOS/src/caffe2/caffe2/proto/caffe2.pb.h"