Can't compile rtmidi test cmidiin.cpp file, Illegal instruction

97 views Asked by At

I'm using Armbian on the Orange Pi board. I try to compile cmidiin.cpp from test folder of the rtmidi lib. Compiling goes with no error messages. But when I run it shows me:

g++ cmidiin.cpp -o t6 -g -lpthread -lasound  -lrtmidi
./t6
Opening f_midi:f_midi 20:0
Illegal instruction

BUT! When I compile it with make command from rtmidi, it works fine. Seems that I don't use some parameters or keys, when I compile. Any ideas how I can fix it? Or how I can get info, what parameters use "make" file? Because now when I run it, I can see only two lines:

CXX      cmidiin.o
CXXLD    cmidiin

rtmidi site

1

There are 1 answers

1
Paul On

Ok, now test file works fine with this command:

g++ -Wall cmidiin.cpp -o t7 /usr/local/lib/librtmidi.so

Very strange that it don't work with -lrtmidi key, and work, when I indicate full path to the lib.