I'm trying to compile and example file which needs the required library libmusicxml.
I compiled the library as they said (cmake, make, make install) and it made and installed a bunch of files:
Install the project... -- Install configuration: "" -- Installing: /usr/local/lib/libmusicxml2.so.3.00 -- Installing: /usr/local/lib/libmusicxml2.so -- Installing: /usr/local/include/libmusicxml/musicxmlfactory.h -- Installing: /usr/local/include/libmusicxml/sortvisitor.h -- Installing: /usr/local/include/libmusicxml/xmlreader.h ... etc Now I want to compile one of their sample files so I run g+ filename.cpp and it gives me the following error:
libmusicxml.h: No such file or directory Does this mean it's not seeing the library in /usr/local? Can I specify this somewhere? Set a path or something?
I have made sure to have the latest version of the libmusicxml library from here and did the same (cmake followed by make).
When I go to the gives samples and try to make one (with the provided make file, which work according to the developer) it doesn't want to do it:
dorien@XP:~/bin/libmusicxml-master/samples$ make gcc -g -O3 -Wall -Wuninitialized -I../src/elements -I../src/interface -I../src/files -I../src/lib -I../src/parser -I../src/visitors -I../src/guido -I../src/operations countnotes.cpp ../libmusicxml2.a -lstdc++ -o countnotes gcc: error: ../libmusicxml2.a: No such file or directory Makefile:14: recipe for target 'countnotes' failed -> I tried to locate libmusicxml2.a and that doesn't seem to exist.
When I run xml2guido (which seems to have a compiled version in the root directory of the package), I get:
xml2guido: error while loading shared libraries: libmusicxml2.so.3.00: cannot open shared object file: No such file or directory However, there is a libmusicxml2.so.3.00 in the same directory
Maybe it's that the package is not linked correctly? Or something about the missing .a file?
I do think it was built correctly:
make [ 73%] Built target musicxml2 [ 75%] Built target RandomMusic [ 78%] Built target countnotes [ 80%] Built target partsummary [ 82%] Built target readunrolled [ 85%] Built target xml2guido [ 87%] Built target xml2midi [ 90%] Built target xmlclone [ 92%] Built target xmlfactory [ 95%] Built target xmliter [ 97%] Built target xmlread [100%] Built target xmltranspose dorien@XP:~/bin/libmusicxml-master$ sudo make install [ 73%] Built target musicxml2 [ 75%] Built target RandomMusic [ 78%] Built target countnotes [ 80%] Built target partsummary [ 82%] Built target readunrolled [ 85%] Built target xml2guido [ 87%] Built target xml2midi [ 90%] Built target xmlclone [ 92%] Built target xmlfactory [ 95%] Built target xmliter [ 97%] Built target xmlread [100%] Built target xmltranspose Install the project... -- Install configuration: "" -- Up-to-date: /usr/local/lib/libmusicxml2.so.3.00 -- Up-to-date: /usr/local/lib/libmusicxml2.so -- Up-to-date: /usr/local/include/libmusicxml/musicxmlfactory.h -- Up-to-date: /usr/local/include/libmusicxml/sortvisitor.h -- Up-to-date: /usr/local/include/libmusicxml/xmlreader.h -- Up-to-date: /usr/local/include/libmusicxml/xmlfile.h -- Up-to-date: /usr/local/include/libmusicxml/libmusicxml.h -- Up-to-date: /usr/local/include/libmusicxml/unrolled_xml_tree_browser.h -- Up-to-date: /usr/local/include/libmusicxml/xml.h -- Up-to-date: /usr/local/include/libmusicxml/elements.h -- Up-to-date: /usr/local/include/libmusicxml/factory.h -- Up-to-date: /usr/local/include/libmusicxml/types.h -- Up-to-date: /usr/local/include/libmusicxml/typedefs.h -- Up-to-date: /usr/local/include/libmusicxml/xml_tree_browser.h -- Up-to-date: /usr/local/include/libmusicxml/versions.h -- Up-to-date: /usr/local/include/libmusicxml/exports.h
libmusicxml.hin/usr/local/include/libmusicxml/Maybe you Need to write#include <libmusicxml/libmusicxml.h>-Ito specify the search path as-I/usr/local/include.-I/usr/local/include/libmusicxml... But /usr/local/include is a Standard include path. it should work without-Ilibmusicxmlindeed.