3

I'm working on getting an example run for the audioCaffe framework http://multimedia-commons.s3-website-us-west-2.amazonaws.com/?prefix=tools/audioCaffe/

The root directory of this project contains an include directory.

Except, when I navigate to tools and compile g++ caffe.cpp it throws an error:

caffe.cpp:8:10: fatal error: 'caffe/caffe.hpp' file not found

note that include/caffe/caffe.hpp exists

12
  • Is the caffe.cpp inside the include directory? Commented Mar 24, 2016 at 23:43
  • Can you describe a bit more about the folder structure and from what directory you execute g++ or I just gotta download the 230MB file to check it out? Commented Mar 24, 2016 at 23:44
  • @Nacho it would be easiest if you just downloaded, thanks Commented Mar 24, 2016 at 23:44
  • @DimChtz no, but there are files all over the project that #include caffe/[header].hpp so it shouldn't need to be, right? Commented Mar 24, 2016 at 23:44
  • 1
    Okay, all you need to do is to tell the compiler where to look for additional include directories, the include folder obviously Commented Mar 24, 2016 at 23:54

1 Answer 1

3

Since you mentioned using g++ caffe.cpp I assume you execute this command form where caffe.cpp file is, which is:

audioCaffe/tools/caffe.cpp 

The caffe.cpp file uses #include "caffe/caffe.hpp" which is in the include directory:

audioCaffe/include/caffe/caffe.hpp 

So you will need to tell the compiler where to find the headers, you do this with the -I option. Compile it with the command:

g++ -I ../include caffe.cpp 
Sign up to request clarification or add additional context in comments.

Comments