ekho
ekho copied to clipboard
test_ekho.cpp
// build command: g++ ../src/test_ekho.cpp -I. -I../include/soundtouch libekho.a -lsndfile ../lib/libSoundTouch.a -lportaudio ../lib/libFestival.a ../lib/libestools.a -lcurses ../lib/libeststring.a ../lib/libestbase.a -lvorbisenc -lvorbis -lm -logg
请教编译时,这些lib*.a的文件在哪里?
已经不需要了,用下面命令来编译:
build command: (run in ekho source root) g++ src/test_ekho.cpp libekho.a -I. -lsndfile -lmpg123 -lpulse -lpulse-simple -lsonic -lespeak-ng
dpk@dpk-virtual-machine:~/wl/code/ekho/ekho-8.6$ g++ src/test_ekho.cpp -I./sonic -I../include/soundtouch libekho.a -I. -lsndfile -lmpg123 -lpulse -lpulse-simple -lsonic -lespeak-ng /usr/bin/ld: cannot find -lmpg123: No such file or directory /usr/bin/ld: cannot find -lsonic: No such file or directory collect2: error: ld returned 1 exit status
If you are using ekho-8.6, -lsonic is not required.
I am not sure whether -lmpg123 is required. You can try to remove that option or install it with sudo apt install libmpg123-dev
.
/usr/bin/ld: libekho.a(libekho_a-musicxml.o): warning: relocation against _ZTIN9MusicXML210xmlelementE' in read-only section
.text._ZN9MusicXML25ctreeINS_10xmlelementEE3endEv[_ZN9MusicXML25ctreeINS_10xmlelementEE3endEv]'
/usr/bin/ld: libekho.a(libekho_a-musicxml.o): in function ekho::EkhoImpl::sing(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': /home/dpk/wl/code/ekho/ekho-8.6/src/musicxml.cpp:26: undefined reference to
MusicXML2::xmlreader::read(char const*)'
/usr/bin/ld: /home/dpk/wl/code/ekho/ekho-8.6/src/musicxml.cpp:30: undefined reference to MusicXML2::xmlelement::find(int)' /usr/bin/ld: /home/dpk/wl/code/ekho/ekho-8.6/src/musicxml.cpp:46: undefined reference to
MusicXML2::xmlelement::find(int)'
/usr/bin/ld: /home/dpk/wl/code/ekho/ekho-8.6/src/musicxml.cpp:51: undefined reference to MusicXML2::xmlelement::find(int)' /usr/bin/ld: /home/dpk/wl/code/ekho/ekho-8.6/src/musicxml.cpp:56: undefined reference to
MusicXML2::xmlelement::find(int)'
/usr/bin/ld: /home/dpk/wl/code/ekho/ekho-8.6/src/musicxml.cpp:63: undefined reference to MusicXML2::xmlelement::find(int)' /usr/bin/ld: /home/dpk/wl/code/ekho/ekho-8.6/src/musicxml.cpp:75: undefined reference to
MusicXML2::xmlelement::find(int, MusicXML2::treeIterator<MusicXML2::SMARTPMusicXML2::xmlelement >)'
/usr/bin/ld: libekho.a(libekho_a-musicxml.o): in function MusicXML2::xmlreader::xmlreader()': /home/dpk/wl/code/ekho/ekho-8.6/./libmusicxml/src/files/xmlreader.h:32: undefined reference to
vtable for MusicXML2::xmlreader'
/usr/bin/ld: libekho.a(libekho_a-musicxml.o): in function MusicXML2::xmlreader::~xmlreader()': /home/dpk/wl/code/ekho/ekho-8.6/./libmusicxml/src/files/xmlreader.h:33: undefined reference to
vtable for MusicXML2::xmlreader'
/usr/bin/ld: libekho.a(libekho_a-musicxml.o): in function MusicXML2::ctree<MusicXML2::xmlelement>::end()': /home/dpk/wl/code/ekho/ekho-8.6/./libmusicxml/src/lib/ctree.h:135: undefined reference to
typeinfo for MusicXML2::xmlelement'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
Add libmusicxml/libmusicxml2.a
option to g++ for ekho-8.6. This dependency is removed in the latest code.
In case of fatal error: utf8.h: 没有那个文件或目录
, add -Iutfcpp/source
. This dependency is also removed in the latest code.