Reputation: 139
I'm pretty new to c++ and I'm trying to figure out how to link hdf5 with my Mac. I've brew install hdf5
, however when I try to include the header file:
#include "H5Cpp.h"
in my c++ code I get an error that says "No such file or directory".
How do I help c++ find the hdf5 installation?
Upvotes: 1
Views: 890
Reputation: 139
As @273K said (the header file from home-brew are located in /usr/local/include/
:
so this works:
g++ -I /usr/local/include main.cpp
Where main.cpp has the line:
#include "H5Cpp.h"
Upvotes: 1