craigsapp / humlib

Humdrum data parsing library in C++
http://humlib.humdrum.org
BSD 2-Clause "Simplified" License
31 stars 8 forks source link

Compiling from humlib.h and humlib.cpp fails at `include "pugiconfig.hpp"` #52

Closed malcolmsailor closed 2 years ago

malcolmsailor commented 2 years ago

I put humlib.h and humlib.cpp in a clean directory together with the example from the README saved in a file called test.cpp. Then, g++ test.cpp fails with

./humlib.h:98:10: fatal error: 'pugiconfig.hpp' file not found
#include "pugiconfig.hpp"

Evidently this file (which as you know is in the include directory of this repository) is not found. Is it possible to compile from with only humlib.h and humlib.cpp somehow, as the README suggests? Or do we need to include other files as well? Thanks!

craigsapp commented 2 years ago

I added XML parsing to humlib after those instructions were written, so you now do need to download the pugi* files now as well.

So the updated instructions are:

wget https://raw.githubusercontent.com/craigsapp/humlib/master/include/humlib.h
wget https://raw.githubusercontent.com/craigsapp/humlib/master/src/humlib.cpp

wget https://raw.githubusercontent.com/craigsapp/humlib/master/src/pugixml.cpp
wget https://raw.githubusercontent.com/craigsapp/humlib/master/include/pugixml.hpp
wget https://raw.githubusercontent.com/craigsapp/humlib/master/include/pugiconfig.hpp

Or on MacOS:

curl https://raw.githubusercontent.com/craigsapp/humlib/master/include/humlib.h -o humlib.h
curl https://raw.githubusercontent.com/craigsapp/humlib/master/src/humlib.cpp -o humlib.cpp

curl https://raw.githubusercontent.com/craigsapp/humlib/master/src/humlib.cpp -o humlib.cpp
curl https://raw.githubusercontent.com/craigsapp/humlib/master/include/pugixml.hpp -o pugixml.hpp
curl https://raw.githubusercontent.com/craigsapp/humlib/master/include/humlib.hpp -o pugiconfig.hpp