Archived

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

MoreK

Dev-C++ - linker error with DirectSoundCreate!

Recommended Posts

Hi I installed Dev-C++ 4.9.8.4 and downloaded DirectX9 package with the WebUpdate utility. To test the setup I downloaded some example code from http://www.gametutorials.com/Tutorials/DirectX/DirectX_Pg1.htm I managed to compile, link and run the fist two (DirectDraw) examples. But when I downloaded Direct Sound examples, I started to get the same linker error: [Linker error] undefined reference to `DirectSoundCreate@12'' Yes, I have added all DirectX libraries (including libdsound.a) to Project Options/Parameter/Linker. Does anyone know how to fix this, PLEASE? DirectSound was the first reason I started to digging into this. I have searched all possible sites and forums, and I can see some other persons have had the same issue. But I haven''t found a solution yet. PLEASE! BR; More K, Helsinki

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hey, I''m having *exactly* the same problem!

Direct Draw works fine, directsound gives the ''DirectSoundCreate@12'' error.

I''ve tried googling for every possible combination of "DirectSoundCreate", "Linker error", "libraries", etc, etc, but I can''t find the answer anywhere.

I also tried using DirectSound8 rather than DirectSound but that doesn''t help either, other than giving a slightly different error.

I did find that including "mmsystem.h" is neccessary when using DirectSound, otherwise I got even more errors. I guess you might need the corresponding library too (libwinmm.a with MingW) though that doesn''t seem to make any difference.

Another thing I found was something about someone having a problem with the number of "_" underscores in front of function names in DirectX. I started experimenting with underscores in the directsound header file, the directsound library file and the directsound .ref file (not even sure exactly what that last sort of file is), under the assumption that I could always just reinstall DirectX.

However, for some reason the DirectX devpack has disappeared from the available packagage list in Dev-C++ update - is that just my computer, a temporary problem with the server, or an indication of a more major issue?

I think I''ll be leaving DirectSound alone for now, I sure hope someone can help us though.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I''m the anon guy again.

I think I''ve found a solution - it compiles OK if I use the DirectX 8 dsound library rather than the DX 9 one.

You can download the DirectX 8 dev kit for Dev-C++ under the resources section of th Dev-C++ site.

I hope I don''t speak too soon though, I''ve not actually tried to make it play a sound yet...

Share this post


Link to post
Share on other sites