[Stk] RtMidi 2.0.0 compile errors

Christopher Arndt chris at chrisarndt.de
Sat Jul 21 08:11:56 PDT 2012


(I wrote to Gary personally with a few problems I found in the latest
RtMidi release, since I didn't know where else to write. I have since
then found this list and am reposting my observation here, since Gary
hasn't answered me yet. Is there a bug tracker for the project or even a
public source code repository?)


Hi Gary,

I)

I was just trying out the new RtMidi 2.0.0 version under Ubuntu Linux
and was getting the following compile error when running make (after
./configure):

$ LC_ALL=C make
g++ -O3 -Wall -I.. -D__LINUX_ALSA__ -c ../RtMidi.cpp -o Release/RtMidi.o
../RtMidi.cpp:1059:8: error: 'string' does not name a type
../RtMidi.cpp: In function 'snd_seq_t* createSequencer(const string&)':
../RtMidi.cpp:1091:9: error: 's_clientName' was not declared in this scope
../RtMidi.cpp:1093:39: error: 's_clientName' was not declared in this scope
make: *** [RtMidi.o] Error 1


I had to change line 1059 in RtMidi.cpp from

    static string s_clientName = "RtMidi Client";

to

    static std::string s_clientName = "RtMidi Client";

to make the library and the test programs compile. Not sure if this is
the correct solution (I'm just getting started with C++) but everything
seems to work with this fix.

II)

Another small RtMidi compilation fix:

On line 31 of Makefile.in you should add the command line option "-f" to
the "ln" command, otherwise there will be an error if the shared library
link already exists:

	$(LN) -sf @sharedname@ $(SHARED)

III)

Another two small compilation problems, namely documentation errors:

a) In the tutorial, in the "Compiling" section, the correct
pre-processor definition for Linux+ALSA should be now '__LINUX_ALSA__'
not '__LINUX_ALSASEQ__'. It's also wrong in the examples column.

This tripped me up, because I used the wrong -D compiler option value in
my project and was wondering why my code was always producing a
"MidiOutDummy: This class provides no functionality." message and no
MIDI ports where found.

b) Also, the correct name for the -framework option for OS X should be
"CoreMIDI" not "CoreMidi.". Most Macs use a case-insensitive file system
but mine doesn't and the CoreMIDI framework would not be found there
when an incorrect framework name is used.



Chris


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1060 bytes
Desc: OpenPGP digital signature
Url : http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20120721/049b2884/attachment.bin 


More information about the Stk mailing list