Archived

This topic is now archived and is closed to further replies.

codemonkey1984

dsutil unresolved external symbol

Recommended Posts

I''m trying to use the dsutil.h and dsutil.c files from the donuts sample in the DX7 SDK to play static wav resources, but every time i try to compile, I get this error:cdmain.obj : error LNK2001: unresolved external symbol _DSLoadSoundBufferBoth the files are in the folder with my source code. I''m linking to dxguid, dsound, and winmm. I already tried deleting my debug folder and recompiling my obj files from scratch.Can someone shed some light on this for me before my laptop violently meets the wall? [img]wink.gif[/img] Thanks!

Share this post


Link to post
Share on other sites
Try searching for the string ''DSLoadSoundBuffer'' in your files. If you can''t find the cpp block of code then you''re either missing a library or an extra source file. I''m not sure if its in Dsound.lib since I never used Dsound before, but if it should be in dsound, maybe use the right version of the lib? i.e. Dinput.lib is different from dinput8.lib.

Share this post


Link to post
Share on other sites
Heh...I''ve been wracking my brain for hours, and I just figured it out--silly me, I assumed the header file would include the .c file...it doesn''t. I had to include the dsutil.c file instead of the dsutil.h file.

I''m still having trouble with the program though...

vexplodesnd = DSLoadSoundBuffer(dsound, "enemy_explosion_sound");

That''s the line I''m using to load the wave file from the resource. But after that line, vexplodesnd is still null. Argh...I''m inexperienced with DirectSound, I know it''s probably some stupid mistake somewhere. Would it matter that I''m setting my cooperative level to DSSCL_NORMAL?

Greg "tatsuo" Khezrnejat
tatsuo64@aol.com
http://blind-daruma.jmc3.net/

Share this post


Link to post
Share on other sites
I figured it out. The dsutil file was looking for "WAV" resources--but VC++ saved the resource script file entries as "WAVE" resources. A quick change to that fixed it.

Greg "tatsuo" Khezrnejat
tatsuo64@aol.com
http://blind-daruma.jmc3.net/

Share this post


Link to post
Share on other sites