Reputation: 58
I am trying to compile a piece of open source software called "SPECIES Identification of Taxonomic Mentions in Text". I am on MacOS.
I downloaded the source code (which can be found here), moved into the directory and used the command make
to compile. This is the error returned:
g++ -fpic -pthread -Wall -O3 -o organisms organisms.cxx -lm -lboost_regex
In file included from batch_tagger.h:5:0,
from organisms.cxx:3:
tagger.h:7:27: fatal error: boost/regex.hpp: No such file or directory
compilation terminated.
make: *** [organisms] Error 1
I installed the C++ boost library using brew install boost
and tried the above steps again (it did not work).
I tried dropping the boost directory into the directory containing the source code (it did not work).
Any suggestions/help?
Upvotes: 3
Views: 5640
Reputation: 21544
You need to tell the compiler where to find boost headers.
You need to use the include path option to specify where the boost headers can be find, use -I/path/to/boost/include
.
Then include the file using #include <boost/regex.hpp>
from your code.
Upvotes: 1