Sign in to follow this  

DirectSound Problem

This topic is 4727 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I am Having some problems with Direct Sound, basically I'm trying to create a class that will allow me to create a "Speaker" and play sound through it. The error is in compilation in the Linker and the message is LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification Speaker_Class.obj : error LNK2019: unresolved external symbol _DirectSoundCreate@12 referenced in function "public: bool __thiscall Speaker::Init(struct HWND__ *)" (?Init@Speaker@@QAE_NPAUHWND__@@@Z) .\Debug/DDraw.exe : fatal error LNK1120: 1 unresolved externals If I just compile this file it works fine, it is just when I compile the whole solution do I get this error. This is the method causing the problem. bool Speaker::Init(HWND hwnd){ DWORD result; // Instantiate the Pointer to the Sound Device result = DirectSoundCreate(NULL, &SoundPlayer, NULL); // Error Check if(result != DS_OK) return false; // Take Control of the Sound Device result = SoundPlayer->SetCooperativeLevel(hwnd,DSSCL_PRIORITY); // Error Check if(result != DS_OK) return false; return true; } and if I comment out the DirectSoundCreate line it compiles fine and just so you know SoundPlayer is a LPDIRECTSOUND. Thanks for any help anyone can give. Rob

Share this post


Link to post
Share on other sites

This topic is 4727 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this