Giter Site home page Giter Site logo

grame-cncm / libmusicxml Goto Github PK

View Code? Open in Web Editor NEW
151.0 22.0 34.0 106.15 MB

A C/C++ library to support the MusicXML format.

License: Mozilla Public License 2.0

CMake 0.05% HTML 0.52% XSLT 0.80% Makefile 0.85% Shell 0.02% C++ 3.24% C 0.32% AMPL 0.36% Lex 0.01% Yacc 0.03% JavaScript 0.02% Dockerfile 0.01% Batchfile 0.01% LilyPond 93.76% TypeScript 0.01%
musicxml music-notation

libmusicxml's Introduction

Welcome to the libmusicxml project

Grame - Centre National de Création Musicale

Build status: Ubuntu MacOSWindows

The MusicXML library is a portable C++ library designed close to the MusicXML format and intended to facilitate MusicXML support.

MusicXML is a music interchange format designed for notation, analysis, retrieval, and performance applications. The MusicXML format has been initialy developed by Recordare. It is open for use by anyone under a royalty-free license.

The libmusicxml library runs on the main operating systems: Linux, MacOS, iOS, Windows, Android. It can also be compiled to JavaScript (using emscripten) to be embedded in a web page.

See the libmusicxml wiki for building instructions.


Dominique Fober

libmusicxml's People

Contributors

arshiacont avatar dfober avatar echeveste-antescofo avatar jacques-menu avatar jfkilian avatar kant avatar lemzwerg avatar zhwei8090 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libmusicxml's Issues

Assertion error when using xmlread

What steps will reproduce the problem?
1. Include the framework in xcode5 correctly
2. read the xml file and print it out to test it is the correct file 
3. use the xmlreader r to read the file (r.read(filename))
4. assert the SXMLFile file but it is null. 

What is the expected output? What do you see instead?
I'm not sure why it isn't working! any help would be appreciated!

Original issue reported on code.google.com by [email protected] on 8 Jul 2014 at 7:31

Code does not compile on Linux

What steps will reproduce the problem?
1. Download the source code on Ubuntu
2. Enter packages/
3. Run "make linux"

I got compiling errors:

cd libmusicxml-3.00-ubuntu-x86_64/include && chmod 644 *.h
make[1]: Leaving directory `XXX/musicxml/libmusicxml/packages'
make exe DEST=libmusicxml-3.00-ubuntu-x86_64 TOOLS="../cmake/xml2guido 
../cmake/xmltranspose"
make[1]: Entering directory `XXX/musicxml/libmusicxml/packages'
cp ../cmake/xml2guido ../cmake/xmltranspose libmusicxml-3.00-ubuntu-x86_64
cp: cannot stat `../cmake/xml2guido': No such file or directory
cp: cannot stat `../cmake/xmltranspose': No such file or directory
make[1]: *** [exe] Error 1
make[1]: Leaving directory `XXX/musicxml/libmusicxml/packages'
make: *** [linux] Error 2

Original issue reported on code.google.com by [email protected] on 1 Jul 2014 at 11:32

Visitor sends newline to wrong stream

Please provide any additional information below.

I believe the following function is in error:

void xmlvisitor::visitEnd ( Sxmlelement& elt ) 
{
        if (!elt->empty()) {
                if (elt->size()) {
                        fendl--;
                        cout << fendl;
                }
                fOut << "</" << elt->getName() << ">";
        }
}

The fend is sent to cout causing newlines to show on stdout rather than in my 
file when using the code to output to an ofstream.  Changing cout to fOut fixed 
my problem with this issue.

Original issue reported on code.google.com by [email protected] on 9 Mar 2015 at 2:42

Sources does't compile. Getting 2 errors

What steps will reproduce the problem?
1. Go to packages directory
2. type: make macos

What is the expected output? What do you see instead?

make exe DEST=libmusicxml-3.00-macosx TOOLS="../cmake/Release/xml2guido 
../cmake/Release/xmltranspose"
cp ../cmake/Release/xml2guido ../cmake/Release/xmltranspose 
libmusicxml-3.00-macosx
cp: ../cmake/Release/xml2guido: No such file or directory
cp: ../cmake/Release/xmltranspose: No such file or directory
make[1]: *** [exe] Error 1
make: *** [macos] Error 2

What version of the product are you using? On what operating system?
Last version. Mac OSX 10.8.2

Please provide any additional information below.
I need to add armv6 and armv7 architectures.

Original issue reported on code.google.com by [email protected] on 6 Mar 2013 at 8:31

Is it possible to support MinGW to include libmusicxml.rc?

Currently, libmusicxml.rc is excluded from MinGW build process.

if(MSVC)
enable_language(RC)
set(LIBCONTENT ${CORESRC} ${COREH} ${LXML}/win32/libmusicxml/libmusicxml.rc)
else()

I tried to remove this if...else...endif condition so that windres tool of MinGW was used to compile libmusicxml.rc.
However, I got errors from the following lines:

FILEVERSION 3.1,1,0
PRODUCTVERSION 3.1,1,0

Problems disappeared after changing them into:

FILEVERSION 3,1,1,0
PRODUCTVERSION 3,1,1,0

Both 3.1 and 3,1 are accepted by MSVC, but only 3,1 is accepted by windres (MinGW).
Thus, did I miss anything to let windres accept 3.1,1,0? Or, would you change libmusicxml.rc to enable MinGW to compile it? Thanks!

MinGW g++-6.3.0 fails to compile the current master (80a876f5...)

I have installed the latest MinGW compiler (i686-6.3.0-posix-dwarf-rt_v5-rev1) and cmake, and I used the following commands to build libmusicxml at the current master branch under libmusicxml/cmake directory:

cmake . -G "MinGW Makefiles"
mingw32-make

I got the following error:

D:...\libmusicxml\src\operations\transposition.cpp: In function 'int round(float)':
D:...\libmusicxml\src\operations\transposition.cpp:26:25: error: 'int round(float)' conflicts with a previous declaration
inline int round(float v) {
^
In file included from C:/mingw-w64/i686-6.3.0-posix-dwarf-rt_v5-rev1/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/math.h:36:0,
from D:...\libmusicxml\src\operations\transposition.cpp:18:
C:/mingw-w64/i686-6.3.0-posix-dwarf-rt_v5-rev1/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/cmath:1790:3: note: previous declaration 'constexpr float std::round(float)'
round(float __x)
^~~~~

This inline function should not be present when round() is already implemented.
(However, 5.x series didn't generate this error.)
I think testing compiler macros such as GNUC may work, or cmake command check_function_exists must help.
check_function_exists looks like check_function_exists(round HAVE_ROUND).

Where can I find documentation/usage information?

I am working on a C++ project that will need to read/write MusicXML files and I came across this repository but I can't seem to find any clear documentation on how to use it. I see that there are build instructions, but is there a user manual/API reference somewhere?

I apologize if it is in an obvious location and I somehow just missed it.

please don't delete and downgrade released versions

@dfober Please don't delete and force-downgrade an already released version!
I have pushed version 3.13 to Arch Linux' official repositories and you removed its sources and (decremented the version to 3.12). What's the reason behind that?
This breaks several things at the same time: semver, reproducible downstream packaging, trust.

Please only increment your version (even if you deem a version to be unstable or unusable, just make a new release with a higher version number!) in the future.

xml2midi error when a chord with ties

when i trasfer a musicxml to midi, if the musicxml contains chord with ties, the midi note duration will be longer than it should be. maybe it's caused by fPendingDuration added dur more than one times on chord.

further more, when tie start and stop match wrong, for example, has start but no stop, the note will lose.

Make xml2lilypond's --help and --version options emit data to stdout

On Unix platforms it is common that the output of --help and --version is sent to stdout. Reason is that you then can easily pipe the output to a pager, e.g., xml2lilypond --help | less.

Currently, it is sent to stderr.

Additionally, for --help, the final message

---No arguments have been supplied, exiting. ---

should be suppressed.

How to use libmusicxml2.a file?

I used cmake to generate the libmusicxml2.a file, but I did not see the Headers file. It cannot be used when importing into the project. What should I do?

Please update SONAME when you change te library interface

Between versions 3.11 and 3.13 you changed the interface, ex. added virtual to guidoelement, but left SONAME to be libmusicxml2.so.3. This is error-prone, because SONAME is what drives updates of dependencies. In case of 3.13 dependencies need to be rebuilt, but SONAME didn't change which means that dependencies don't need to be rebuilt.

When there are multiple voices, the repeat label will display abnormally at the end

test4.xml.zip
Correct effect:
image

image

{[ \staff<1> \set<autoHideTiedAccidentals="on"> \auto<autoInstrPos="on"> \instr<"Piano"> \accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2"> 
   (* meas. 1 *)  \clef<"g2"> \key<0> \meter<"3/8", autoBarlines="off", autoMeasuresNum="system"> _/16 _/16 _/8 _/8 \bar<measNum=2> 
   (* meas. 2 *)  \stemsDown \beamsOff c2/4. \repeatEnd ]
 , 
[ \staff<1> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="1"> 
   (* meas. 1 *)  empty/4 empty/8 \bar<measNum=2> 
   (* meas. 2 *)  \repeatEnd empty*3/8 ]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \staffFormat<distance=13> \clef<"f4"> \key<0> \meter<"3/8", autoBarlines="off", autoMeasuresNum="system"> \stemsUp \beamsOff c1/8 _/8 _/8 \bar<measNum=2> 
   (* meas. 2 *)  _*3/8 \repeatEnd ]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \staffFormat<distance=13> \stemsDown \beamsOff c1/4. \bar<measNum=2> 
   (* meas. 2 *)  \repeatEnd empty*3/8 ]
  }

Cross-spectrum connection is not supported

image

the line is missing:
image

this is xml:
test_line.xml.zip

(*
  gmn code converted using libmusicxml v.3.21
  and the embedded xml2guido converter v.3.2
*)
{[ \staff<1> \set<autoHideTiedAccidentals="on"> \auto<autoInstrPos="on"> \instr<"钢琴"> \accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2"> 
   (* meas. 1 *)  \clef<"g2"> \key<0> \meter<"4/4", autoBarlines="off", autoMeasuresNum="system"> \stemsUp \beamsOff a1/4 \stemsDown \beamsOff d2/4 \stemsDown \beamsOff b1/4 \stemsUp \beamsOff e1/4 ]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \staffFormat<distance=13> \clef<"f4"> \key<0> \meter<"4/4", autoBarlines="off", autoMeasuresNum="system"> \intens<"f", dy=19hs, dx=0> \stemsDown \beamsOff \fingering<dy=-7hs, dx=0.2, text="4">( g0/4)
 \stemsDown \beamsOff a0/4 \stemsDown \beamsOff b0/4 \stemsDown \beamsOff c1/4 ]
  }

Fingering position offset problem

Guidoeditor has a fingering offset problem

test_4.xml.zip
seen at finale:
image

{[ \staff<1> \set<autoHideTiedAccidentals="on"> \title<"test"> \composer<"test", dy=4hs> \auto<autoInstrPos="on"> \instr<"MusicXML Part"> \accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2"> 
   (* meas. 1 *)  \clef<"g2"> \key<0> \meter<"4/4", autoBarlines="off", autoMeasuresNum="system"> \stemsUp \beamBegin:1 \fingering<dy=8hs, dx=0.4, text="5">( c2/8)
 \stemsUp b1/8 \stemsUp a1/8 \stemsUp g1/8 \beamEnd:1 \stemsUp \beamBegin:1 \fingering<dy=10hs, dx=0.6, text="1">( f1/8)
 \stemsUp \fingering<dy=8.6hs, dx=1.4, text="3">( e1/8)
 \stemsUp \fingering<dy=9.6hs, dx=0.4, text="2">( d1/8)
 \stemsUp \fingering<dy=10.6hs, dx=0.6, text="1">( c1/8)
 \beamEnd:1 ]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \clef<"f4"> \key<0> \meter<"4/4", autoBarlines="off", autoMeasuresNum="system"> _/1 ]
}

Parameter of yyerror() is const char*?

Dear staff:

Your code raises several warnings in gcc 4.5.x

One of them is that yyerror() receives a "char*" parameter, but you give it a 
double-quotation enclosed C string. This implicit cast has been deprecated. 
Please let yyerror() have a "const char*" string and this warning will 
disappear. Thanks!

Original issue reported on code.google.com by [email protected] on 15 Aug 2013 at 4:26

Add -std=c++11 on generating MinGW Makefiles

The current dev branch fails to compile using MinGW g++ 4.9 series. Specifically, I compiled it using MinGW g++ 4.9.4.
After adding the following lines into CMakeLists.txt, it will work:

@@ -54,6 +54,8 @@ elseif(WIN32)
         add_definitions(-DVC6)
     elseif(${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005")
         add_definitions(-DVC2005)
+    elseif(${CMAKE_GENERATOR} STREQUAL "MinGW Makefiles")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
     endif(${CMAKE_GENERATOR} STREQUAL "Visual Studio 6")

Could you help add them? Thanks.

partial headers installation ?

Hello,
It seems make install just install (in addition to the library) the following headers:

ls /usr/local/include/libmusicxml/
exports.h  libmusicxml.h

while the doxygen documentation lists a lot of classes that are not declared in libmusicxml.h, such as, for example, xmlreader.
Is is a bug or is it the expected behaviour (and why) ?

xml2guido lyric visitor

Unless I got sth wrong, I believe the XML2Guido modules does not visit or convert "lyric" in the MusicXML. It would be great to have this feature... . If there's any guideline for this, we would be happy to contribute.

The latest code xml to mid has the problem of incorrect sound

From the visual effect, there is no problem, but when converted to the mid file, the sound value of the first tick time after the end of the octave mark has an octave deviation, and the other sounds are correct (note that it is necessary to Use the code of the latest dev branch, if it is converted from https://guidoeditor.grame.fr/ here, there is a display problem)

This is the test xml:
test18.xml.zip

This is the gmn of the latest dev branch code conversion:

{[ \staff<1>   \accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2"> 
   (* meas. 1 *)  \clef<"g2"> \key<1> \meter<"2/4", autoBarlines="off", autoMeasuresNum="system"> _/2 \bar<measNum=2> 
   (* meas. 2 *)  \oct<1> \stemsDown \beamBegin:1 d4/16 \stemsDown c4/16 \stemsDown a3/16 \oct<0> \stemsDown f#2/16 \beamEnd:1 \stemsDown \beamBegin:1 d3/16 \stemsDown c3/16 \stemsDown a2/16 \stemsDown f#2/16 \beamEnd:1 ]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \staffFormat<distance=13> \clef<"f4"> \key<1> \meter<"2/4", autoBarlines="off", autoMeasuresNum="system"> _/2 \bar<measNum=2> 
   (* meas. 2 *)  _/2 ]
 }

Wrongly versioned shared libraries installed

3.13 installed

lib/libmusicxml2.so
lib/libmusicxml2.so.3
lib/libmusicxml2.so.3.1.2

3.14 now installs:

lib/libmusicxml2.so
lib/libmusicxml2.so.3.1.2
lib/libmusicxml2.so.4

Major part of the version now doesn't match.

please don't retag versions

During a maintenance rebuild of version 3.14 I realized, that again, similar to #24, a tag has been changed. This is really not great for reproducibility.

My package for Arch Linux' [community] repository was built from a tarball downloaded on Nov 16 2018.

If I build from the current tarball, the difference is basically only the soname change:

diff -ruN /home/dave/packages/svn-community/libmusicxml/trunk/libmusicxml-3.14/build/CMakeLists.txt libmusicxml-3.14/build/CMakeLists.txt
--- /home/dave/packages/svn-community/libmusicxml/trunk/libmusicxml-3.14/build/CMakeLists.txt   2018-11-16 08:06:05.000000000 +0100
+++ libmusicxml-3.14/build/CMakeLists.txt       2018-11-19 09:13:42.000000000 +0100
@@ -9,10 +9,10 @@
 
 #######################################
 # versions management
-set (VERSION 3.1.2)
-set (STRVERS "v.3.12")
-set (SSTRVERS "3.12")
-set (SOVERS 4)
+set (VERSION 3.1.4)
+set (STRVERS "v.3.14")
+set (SSTRVERS "3.14")
+set (SOVERS 3)
 set (XMLVERSION 3.1)

Please avoid this, as it really doesn't help with reproducibility of packaging and (in this case) even breaks packaging itself, if it goes unnoticed.

At any rate: I'm glad the soname is fixed now ;-)

Latest tag is invalid

Hi! I package this project for Arch Linux.

Your latest tag is invalid. Please release one that follows semver and that sorts newer than 3.21, as I will otherwise not package it.

compilation error

[d539b71, branch 'lilypond']

Using gcc 4.8.5 (and cmake 3.5.2) on my GNU/Linux box, I get a compilation error, see attached log file.

Maybe version 4.8.5 is too old – if this is true, there should be a proper cmake check to request the necessary C++11 features.

Or the octave problem, I found that I can't get around it

When the octave label appears at the last position of the measure, the sound at the first position of the next measure will inevitably be affected. Through analysis, there should be a problem when converting xml to gmn
exported xml:
42_3_finale.xml.zip
In finale it is like this:
image
But after converting to gmn, it's not right, moved down an octave:
image

{[ \staff<1> \set<autoHideTiedAccidentals="on"> \auto<autoInstrPos="on"> \instr<"钢琴"> \accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2"> 
   (* meas. 1 *)  \clef<"g2"> \key<0> \meter<"4/4", autoBarlines="off", autoMeasuresNum="system"> \oct<1> \stemsDown \beamsOff b2/2 \stemsDown \beamsOff b2/2 \oct<0> \bar<measNum=2> 
   (* meas. 2 *)  \stemsAuto \beamsOff b0/1 ]
 , 
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> 
   (* meas. 1 *)  \staffFormat<distance=13> \clef<"f4"> \key<0> \meter<"4/4", autoBarlines="off", autoMeasuresNum="system"> _/1 \bar<measNum=2> 
   (* meas. 2 *)  _/1 ]
  }

CMakeLists.txt: Correct target name

I use cmake and MinGW to build libmusicxml. I obtain liblibmusicxml.dll, which seens not to be an expected output name. Change this line:

set(target libmusicxml)

to

set(target musicxml)

will solve this issue. Thanks.

How to compile a dylib on macOS

Hi @dfober

I am trying to write a java wrapper for this library and I'd need to compile this as shared object to be able to call into this.

I followed the instructions mentioned in the wiki

 sudo xcode-select --reset
 make -C build -j 2

However, the result is a framework rather than a dylib. Could you please guide me here a bit ?

xml2midi crashes when calling browser.browse()

What steps will reproduce the problem?
1. Attempt compiling the code attached below which closely resembles the 
xml2midi sample.
2. Provide the test file I have used (I have tried using other files though).


What is the expected output? What do you see instead?
Application crashing on browser.browse

What version of the product are you using? On what operating system?
Windows 7 32 Bit, libmusicxml-3.00-win32, QtCreator, MS VC Compiler

Please provide any additional information below.

-------
Thanks a lot for reading this! I´d really appreciate if you took the time to 
help me getting this work.

Original issue reported on code.google.com by [email protected] on 16 Jul 2013 at 12:34

Attachments:

How to generate the framework for iOS?

Check dependencies
warning: The armv7 architecture is deprecated for your deployment target (iOS 12.1). You should update your ARCHS build setting to remove the armv7 architecture.
warning: The armv7s architecture is deprecated for your deployment target (iOS 12.1). You should update your ARCHS build setting to remove the armv7s architecture.

PhaseScriptExecution CMake\ Rules ios/libmusicxml2.build/Release-iphoneos/ALL_BUILD.build/Script-7DF70B90500B41DB8E377C36.sh
cd /Users/liwang/Desktop/libmusicxml-dev/build
/bin/sh -c /Users/liwang/Desktop/libmusicxml-dev/build/ios/libmusicxml2.build/Release-iphoneos/ALL_BUILD.build/Script-7DF70B90500B41DB8E377C36.sh
echo ""

echo Build\ all\ projects
Build all projects

** BUILD SUCCEEDED **

cp ios/Release-iphoneos/libmusicxml2.a .

Why can't I call the API when I use it?

Which methods are callable from external programs ?

Hmm, now I'd need to learn which methods really exist inside this library and how to call them.

As a starting point I used nm -D command, which exists with the following output

Abhinavs-MacBook-Pro:resources eklavya$ nm -D ./libmusicxml2.3.1.4.dylib 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: ./libmusicxml2.3.1.4.dylib: File format has no dynamic symbol table.

Visibility issue in lilypond/utilities.h

I failed to build xml2ly.exe, because the linker could not find std::ostream& operator<< (std::ostream&, const indenter&).
This is an issue of visibility. Could you add EXP before its declaration in utilities.h?
Also, std::ostream& operator<< (std::ostream&, const timing&) is not declared EXP. If this operator is sure to be part of the API, please add EXP, too.
Thanks.

Cannot link libmusicxml2 using MINGW g++.

Dear staff:

I want to use libmusicxml2 in my project, but there are a lot of linker errors.

My compiler is installed from mingw-get-inst-20120426.exe, and my directory 
(folder) contains "code.cpp, "include/", "libmusicxml2.dll", 
"libmusicxml2.lib". In the same folder, I put run.bat as a batch file 
containing the following commands:

set PATH=%PATH%;C:\MinGW\bin
C:\MinGW\bin\g++ -static -static-libgcc code.cpp -I include libmusicxml2.lib 
2>error.txt

I click run.bat, and error.txt reports the following errors:

C:\DOCUME~1\SPONGE~1\LOCALS~1\Temp\ccxF5Zgq.o:code.cpp:(.text$_ZN9MusicXML29xmlr
eaderC1Ev[MusicXML2::xmlreader::xmlreader()]+0x17): undefined 

reference to `_imp___ZTVN9MusicXML29xmlreaderE'
C:\DOCUME~1\SPONGE~1\LOCALS~1\Temp\ccxF5Zgq.o:code.cpp:(.text$_ZN9MusicXML29xmlr
eaderD1Ev[MusicXML2::xmlreader::~xmlreader()]+0xc): undefined 

reference to `_imp___ZTVN9MusicXML29xmlreaderE'
collect2: ld returned 1 exit status

I try another command:

set PATH=%PATH%;C:\MinGW\bin
C:\MinGW\bin\g++ -static -static-libgcc code.cpp -I include -L . -l 
libmusicxml2 2>error.txt

g++ still returns the same error message.

There is only one statement in code.cpp, main function:

#include "xmlreader.h"
using namespace MusicXML2;
int main(){
  xmlreader r;
}

Please tell me how to correctly link to musicxml2 library (by command line and 
g++). Thank you very much!

Original issue reported on code.google.com by [email protected] on 27 May 2013 at 5:43

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.