Advertisement

Tuts on playing MIDIs with DX7

Started by November 15, 1999 09:08 PM
1 comment, last by Bongo 25 years, 1 month ago
no one seems to have responded to your posting.. well, if you haven't figured out your problem yet: As you may know DMusic is large, and the first part of DX that uses complete COM..
I've had the same error before and it seems to happen if you have any of these files included in your project more than once:
objbase.h
initguid.h

OR
#define INITGUID

not sure if thats helps..

later -
Nathan Strandberg
CEO, Dira Interactive

"Always forgive your enemies, nothing annoys them more.."
Anyone know of some clear tutorials for using DirectMusic for DX7? I tried getting an app to play some using the DirectMusic.doc in the DX7 tutorial section, but i keep getting this link error when i compile the darned thing:

Linking...
music.obj : error LNK2001: unresolved external symbol "struct IDirectMusicSegment * __cdecl LoadMIDISegment(struct IDirectMusicLoader *,unsigned short)"(?LoadMIDISegment@@YAPAUIDirectMusicSegment@@PAUIDirectMusicLoader@@G@Z)
Debug/MusicExample.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MusicExample.exe - 2 error(s), 0 warning(s)

I thought maybe i was leaving a .h or .lib file out cause i've had LNK 2001 errors before and it was because i left a .lib file out, but i don't think that's the case... Frankly i don't even understand the error

Anyone have any suggestions? (I copied the functions right out of the tutorial in dmusic.doc)

Advertisement

All I needed was:

#include < dmusicc.h >
#include < dmusici.h >

There are no libs for DM. Only headers. It's all COM. You need to use
functions like CoInitialize, CoCreateInstance, and CoUninitialize
and other stuff.

Reaver

[This message has been edited by Reaver (edited November 15, 1999).]

This topic is closed to new replies.

Advertisement