BaH.rtMidi Module problem

BlitzMax Forums/Brucey's Modules/BaH.rtMidi Module problem

Midimaster(Posted 2012) [#1]
I think I found a problem in the rtMidi-Module, or is it a problem of MinGW or is it BlitzMax? I not very experienced in module topics and I don't know how to deal with the error messages.

I changed form BlitzMax 1.39 to 1.48, because I set up a new computer. After installing BlitzMax, I copied the module folders from the old computer. The same with MinGW. The system variables are correct, BlitzMax could build all modules.

When I start this program, I get more than 100 error messages
	SuperStrict
'Import koriolis.zipstream
Import BaH.RtMidi
'Import BaH.Volumes 
'Import MaxGUI.Drivers
End 


all runs perfect5 with this constellation:

	SuperStrict
Import koriolis.zipstream
'Import BaH.RtMidi
Import BaH.Volumes 
Import MaxGUI.Drivers
End


The error messages look like this:
Building untitled1
Compiling:untitled1.bmx
flat assembler version 1.69.14 (1152622 kilobytes memory)
3 passes, 2081 bytes.
Linking:untitled1.exe
C:/BlitzMax/mod/bah.mod/rtmidi.mod/rtmidi.release.win32.x86.a(glue.cpp.release.win32.x86.o):glue.cpp:(.text+0x5c): undefined reference to `__gxx_personality_sj0'
C:/BlitzMax/mod/bah.mod/rtmidi.mod/rtmidi.release.win32.x86.a(glue.cpp.release.win32.x86.o):glue.cpp:(.text+0x6f): undefined reference to `_Unwind_SjLj_Register'
....
$_ZNSt5dequeIN8RtMidiIn11MidiMessageESaIS1_EE16_M_push_back_auxERKS1_[__ZNSt5dequeIN8RtMidiIn11MidiMessageESaIS1_EE16_M_push_back_auxERKS1_]+0x283): undefined reference to `_Unwind_SjLj_Resume'
Build Error: Failed to link C:/BlitzMax/tmp/untitled1.exe
Process complete


This are the version informations: BlitzMax=1.4.8, FASM=1.69.14, GCC=3.4.5, G++=3.4.5, Bah.rtMidi=1.01, rtMidi=1.0.14

When I use the old BlitzMax 1.39 everything runs perfect. Has somebody an idea, what I should do and what happens?

Last edited 2012


Ole JR(Posted 2012) [#2]
BMax, and it's libs, since 1.44 has been using gcc/g++ 4.6.
So I think it's you combination of BMax1.48 & gcc/g++ 3.4.5..

Something was changed in gcc between 3.x & 4.x that made them not combatible.

Might have better luck with http:///nuwen.net/mingw.html
or direct downloadlink: http://nuwen.net/files/mingw/mingw-9.0.exe

But then again, be aware that this might break old modules..

EDIT:
Got the rtmidi mod from brucey's svn, built it,
and your (small) program seems to work here.
Running BMax 1.48 & gcc/g++ 4.7 (from the link above) on Windows7 x64

Last edited 2012


Midimaster(Posted 2012) [#3]
Thank you Ole,

this is a step ahead! The builing now works. I never heared about that relation between new versions of BMax and necessary new MinGW.

But first tests with the module did not work. Would you please run this test code made by brucey on your machine:



I get a EXEPTION_ACESS_VIOLATION at this line:
Local midiOut:TRtMidiOut = New TRtMidiOut.Create()


but i am not sure, whether it is because of the new computers hardware, or still the MinGW-problem...

You wrote something about brucey's svn. I never did something with snv. How to do and where to find? Could this be the source of my second problem? I "only" re-builded all modules.

Last edited 2012


Henri(Posted 2012) [#4]
You need SVN program like http://tortoisesvn.tigris.org/
Brucey's SVN repository is located in http://maxmods.googlecode.com/svn/trunk


Ole JR(Posted 2012) [#5]
I get the same error as you when running the code above.
It seem to fail in c/c++, or brucey's cluecode somewhere.

I have no idea how to fix it.

But talking svn/subversion you got the links you need above,
or directdownload http://tortoisesvn.net/downloads.html

And if you need some info on svn/subversion, there's always the TortoiseSVN manual(s).


Midimaster(Posted 2012) [#6]
Thank you Ole...

for testing this. So it does not result in an old version of rtMidi.mod.

Now I will contact Brucey. Perhaps he can hel me...


Zeke(Posted 2012) [#7]
Win 7 , bmax 1.48, gcc version 4.6.2, bah.rtmidi (latest svn version 1.02 with rtmidi version 1.0.15) and all above tests and bah.rtmidi examples are working without errors.

well, i got this error:
RtMidiIn::initialize: no MIDI input devices currently available.
No Input Ports

but bah.rtmidi works


Midimaster(Posted 2012) [#8]
i changed now to GCC 4.7.0 and updated the rtMidi.mod via SVN, but I still have the same problem with EXEPTION_ACESS_VIOLATION like Ole.

Now I run a test with GCC 4.6.3 and a Windows XP SP3 System.

Can I use "Rebuild all modules" when I change the MinGW version? Should I ? Or should I re-install the BlitzMax from BlitzBasic.Com and only run "Build Modules"?

Please help I am very unexperienced in compiling topics....

Thanks Zeke.. your message makes me hope. And the error message with midi in is normal, because you do not have a plugged in midi device, or?


#edit

Ok, it seems to run... only one little error occured: I had to change dimension in bruceys test code to 3
Local message:Byte[] = New Byte[3]
....
message[2] = 90


Now I do the tests with other modules I normaly need...

Last edited 2012