ofxThreadedMidiPlayer on windows

Dear all,

when trying to compile the example of ofxThreadedMidiPlayer on windows 7 VS (I already did comment out the PRETTY_FUNCTION stuff), I get multiple

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2005	_main already defined in create_midifile.obj	tryMidiPlayer	C:\Users\coettinger\Documents\of_v0.9.3_vs_release\apps\myApps\tryMidiPlayer\jdksmidi_test_multitrack1.obj	1	
Error	LNK2005	_main already defined in create_midifile.obj	tryMidiPlayer	C:\Users\coettinger\Documents\of_v0.9.3_vs_release\apps\myApps\tryMidiPlayer\jdksmidi_test_parse.obj	1	
Error	LNK2005	_main already defined in create_midifile.obj	tryMidiPlayer	C:\Users\coettinger\Documents\of_v0.9.3_vs_release\apps\myApps\tryMidiPlayer\jdksmidi_test_show.obj	1	
Error	LNK2005	"void __cdecl args_err(void)" (?args_err@@YAXXZ) already defined in jdksmidi_rewrite_midifile.obj	tryMidiPlayer	C:\Users\coettinger\Documents\of_v0.9.3_vs_release\apps\myApps\tryMidiPlayer\rewrite_midifile.obj	1	
Error	LNK2005	_main already defined in create_midifile.obj	tryMidiPlayer	C:\Users\coettinger\Documents\of_v0.9.3_vs_release\apps\myApps\tryMidiPlayer\rewrite_midifile.obj	1	
Error	LNK2005	_main already defined in create_midifile.obj	tryMidiPlayer	C:\Users\coettinger\Documents\of_v0.9.3_vs_release\apps\myApps\tryMidiPlayer\vrm_music_gen.obj	1	
Error	LNK2005	_main already defined in create_midifile.obj	tryMidiPlayer	C:\Users\coettinger\Documents\of_v0.9.3_vs_release\apps\myApps\tryMidiPlayer\jdksmidi_test_drvwin32.obj	1	
Error	LNK2005	_main already defined in create_midifile.obj	tryMidiPlayer	C:\Users\coettinger\Documents\of_v0.9.3_vs_release\apps\myApps\tryMidiPlayer\main.obj	1	
Error	LNK1169	one or more multiply defined symbols found	tryMidiPlayer	C:\Users\coettinger\Documents\of_v0.9.3_vs_release\apps\myApps\tryMidiPlayer\bin\tryMidiPlayer_debug.exe	1	

Did someone get it to work on windows?
Thanks in advance!
oe

Hi dasoe,
Curious to know how you got to this stage. It seems you just have a duplicate symbol somewhere, but I’m having more trouble getting the jdksmidi library working for VS. Did you have to recompile it?

cheers

I think that the PRETTY_FUNCTION stuff is my fault. It doesnt work on windows. It’s just for debugging.
I dont remember if I compiled it on windows. as @cherdd suggests that sounds like a duplicate symbol. make sure that you are not adding any examples from the midi library. I’ll take a look at it next week.
best

Hi cherdd, Hi roymacdonald!

I can not really tell muchabout it, sorry. I in the end used ofxMidi for simple tasks and MIDIData and MIDIClock Libraries from OpenMIDIProject for a simple player. So I did not dig deep into ofxThreadedMidiPlayer. I do not use jdksmidi in my project now.
When compiling I did not have any problems with jdksmidi. As for the actual problem: I do not understand the part “adding any examples from the midi library”. What I did:

  • create a new VS openFrameworks project with ofxMidi and ofxThreadedMidiPlayer
  • copied the example code from addon folder
  • tried to compile - brings me the above errors

Nothing more. I can try again, if it helpful.

have a good day all!
oe