Sign in to follow this  
donjonson

as anyone used the DXUTsound samples?

Recommended Posts

I am trying to integrate it into my game it is giving me difficulty when trying to compile. I have successfully converted my game so that it can compile in unicode (DXUT requires it) But now I am having all kinds of strange compile errors with the DXUT files. it is not recognizing some strutcs and some data types. If I hover the cursor over the struct or data type, the info of what it is pops up, so the compiler is able to recognize them. does anyone have any ideas what I should do. I am pretty sure I have linked all the appropriate libs. here is what I have linked: gdi32.lib d3d9.lib d3dx9.lib user32.lib dinput8.lib dxguid.lib dsound.lib dxerr9.lib winmm.lib comctl32.lib any suggestions?

Share this post


Link to post
Share on other sites
Compiler errors are different from linker errors, they have nothing to do with the libraries linked. What kind of errors are you getting? Can you paste them here?

If you're using Visual C++ 6.0, make sure you're using a compatible SDK (October 2004 with the extras library). Also make sure you have a recent Platform SDK.

Share this post


Link to post
Share on other sites
I am using VC++ express beta 2, and june 2005 dx SDK.


c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(36) : error C2143: syntax error : missing ';' before '*'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(36) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(36) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(43) : error C2146: syntax error : missing ';' before identifier 'GetDirectSound'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(43) : error C2433: 'CSoundManager::LPDIRECTSOUND8' : 'inline' not permitted on data declarations
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(43) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(43) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(43) : warning C4183: 'GetDirectSound': missing return type; assumed to be a member function returning 'int'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(45) : error C2061: syntax error : identifier 'LPDIRECTSOUND3DLISTENER'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(43) : error C2065: 'm_pDS' : undeclared identifier
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(60) : error C2143: syntax error : missing ';' before '*'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(60) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(60) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(66) : error C2061: syntax error : identifier 'LPDIRECTSOUNDBUFFER'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C2143: syntax error : missing ')' before '*'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C2143: syntax error : missing ';' before '*'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C2460: 'CSound::LPDIRECTSOUNDBUFFER' : uses 'CSound', which is being defined
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(58) : see declaration of 'CSound'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C2146: syntax error : missing ';' before identifier 'dwDSBufferSize'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C2146: syntax error : missing ';' before identifier 'dwNumBuffers'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C2143: syntax error : missing ';' before '*'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C2146: syntax error : missing ';' before identifier 'dwCreationFlags'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C2059: syntax error : ')'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(72) : error C2061: syntax error : identifier 'LPDIRECTSOUND3DBUFFER'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(73) : error C2061: syntax error : identifier 'LPDIRECTSOUNDBUFFER'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(74) : error C2146: syntax error : missing ';' before identifier 'GetFreeBuffer'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(74) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(74) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(74) : warning C4183: 'GetFreeBuffer': missing return type; assumed to be a member function returning 'int'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(75) : error C2146: syntax error : missing ';' before identifier 'GetBuffer'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(75) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(75) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(75) : warning C4183: 'GetBuffer': missing return type; assumed to be a member function returning 'int'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(78) : error C2061: syntax error : identifier 'LPDS3DBUFFER'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C2146: syntax error : missing ')' before identifier 'pDSBuffer'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C2146: syntax error : missing ';' before identifier 'pDSBuffer'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C2460: 'CStreamingSound::LPDIRECTSOUNDBUFFER' : uses 'CStreamingSound', which is being defined
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(92) : see declaration of 'CStreamingSound'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C2146: syntax error : missing ';' before identifier 'dwDSBufferSize'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C2143: syntax error : missing ';' before '*'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C2146: syntax error : missing ';' before identifier 'dwNotifySize'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C2059: syntax error : ')'
c:\documents and settings\mark whittaker\desktop\current programing files\spelltriss\dxutsound.h(102) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c




those are some of the errors. They are being generated from DXUTsound.h which is located in the samples section of the DX SDK.

to give you an edxample of whare the errors are coming from, the first error on the list is reguarding the following line in DXUTsound.h:



class CSoundManager
{
protected:
//THE NEXT LINE GENERATES THE FIRST ERROR
IDirectSound8* m_pDS;

public:
CSoundManager();
~CSoundManager();

HRESULT Initialize( HWND hWnd, DWORD dwCoopLevel );
inline LPDIRECTSOUND8 GetDirectSound() { return m_pDS; }
HRESULT SetPrimaryBufferFormat( DWORD dwPrimaryChannels, DWORD dwPrimaryFreq, DWORD dwPrimaryBitRate );
HRESULT Get3DListenerInterface( LPDIRECTSOUND3DLISTENER* ppDSListener );

HRESULT Create( CSound** ppSound, LPWSTR strWaveFileName, DWORD dwCreationFlags = 0, GUID guid3DAlgorithm = GUID_NULL, DWORD dwNumBuffers = 1 );
HRESULT CreateFromMemory( CSound** ppSound, BYTE* pbData, ULONG ulDataSize, LPWAVEFORMATEX pwfx, DWORD dwCreationFlags = 0, GUID guid3DAlgorithm = GUID_NULL, DWORD dwNumBuffers = 1 );
HRESULT CreateStreaming( CStreamingSound** ppStreamingSound, LPWSTR strWaveFileName, DWORD dwCreationFlags, GUID guid3DAlgorithm, DWORD dwNotifyCount, DWORD dwNotifySize, HANDLE hNotifyEvent );
};



I know i am probably just doing something really stupid but I am hoping you can point it out to me.


thanks

Share this post


Link to post
Share on other sites
Hi donjonson,
As Coder states, these are compile time errors and not linker errors
I haven't gone through all the error messages, but the first error message indicates you need to #include <DSound.h> *BEFORE* including DXUTsound.h

HTH,
Cambo_frog

Share this post


Link to post
Share on other sites

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