-
August 28th, 2004, 08:13 AM
#1
Change include paths + Visual Studio
Hi all,
I am creating a sound engine in visual studio (.net 2003). Well, I have to include <dsound.h>. I have installed the directx sdk, but when I include <dsound.h>, it includes a film from visual studio\prerelease\.
Can I set the include directory of the directx header files???
Thanks!
-
August 28th, 2004, 08:51 AM
#2
Re: Change include paths + Visual Studio
Hi,
you can either set local include paths for your current project and/or global for alle projects. There you simply need to add your DirectX include folder and move it prior to the SDK list entry. Thats all.
Here's the position where you can find the options (I needed to translate from german, so your menu entries may have different names):
(Menu) Extras -> Options -> (Dialog) Projects -> VC++ Directories : Set Directory Type to Include Directories and add your directory
Project only:
(Popup Menu) Project Properties -> (Dialog) Configuration -> C/C++ -> Common : Additional Include Directories
Good luck!
Michael Maier
xplo.re
Project Management
http://xplo-re.com/ [^]
Giving reputation lets one know if a reply has been helpful. Thanks.
-
August 28th, 2004, 10:45 AM
#3
Re: Change include paths + Visual Studio
well, it already is in the main settings. It is the directory at the top (so I guess directx inserted it there already)
I also tried to add the project specific option (adding extra include path), but both options didn't work!
Note: I first started the project, and then I installed DirectX SDK. That should be no problem, right?
-
August 28th, 2004, 11:36 AM
#4
Re: Change include paths + Visual Studio
Yes, usually does DirectX SDK does this for you... And installing the SDK after creating the project isn't a problem (or, shouldn't).
Did you check the DirectX include directory for dsound.h? Maybe the file got corrupted or lost, however this may have happened.
Michael Maier
xplo.re
Project Management
http://xplo-re.com/ [^]
Giving reputation lets one know if a reply has been helpful. Thanks.
-
August 28th, 2004, 11:39 AM
#5
Re: Change include paths + Visual Studio
well, strange. The white edit control above my document says the location of the <dsound.h> is microsoft visual studio .net\vc7\platformsdk\include\prerelease\dsound.h
But when I compile, there are a lot of errors in the dsound.h. The filename is then:
e:\directx\Include\dsound.h
very weird, but it get's the right file now (at least, i guess)
But why are all the compiling errors??
DirectX\Include\dsound.h(230): error C2501: 'LPCWAVEFORMATEX' : missing storage-class or type specifiers
DirectX\Include\dsound.h(349): error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
Thanks for the help so far!
-
August 28th, 2004, 11:53 AM
#6
Re: Change include paths + Visual Studio
This is quite common, MSDEV somehow first searches it's "well known" include directories when using the "Open xy.h" command, somehow ignoring the include directory list.
About the compile errors, LPCWAVEFORMATEX is a type defination of dsound.h for a const WAVEFORMATEX* structure pointer; it usually should be avaible. Also it should have been defined there...
Quite at the beginning of the dsound.h file should stand the following lines:
Code:
//
// Compatibility typedefs
//
#ifndef _LPCWAVEFORMATEX_DEFINED
#define _LPCWAVEFORMATEX_DEFINED
typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
#endif // _LPCWAVEFORMATEX_DEFINED
Maybe a defination miss-match in your project?
Michael Maier
xplo.re
Project Management
http://xplo-re.com/ [^]
Giving reputation lets one know if a reply has been helpful. Thanks.
-
August 28th, 2004, 12:21 PM
#7
Re: Change include paths + Visual Studio
no, all errors occure in the dsound.h
I also linked dsound.lib to my project!
and the list with errors is long, very long!
-
August 28th, 2004, 12:36 PM
#8
Re: Change include paths + Visual Studio
Hmm, thats strange. Can you post your dsound.h so I can have a look at it?
Also, did you change some compiler settings?
Michael Maier
xplo.re
Project Management
http://xplo-re.com/ [^]
Giving reputation lets one know if a reply has been helpful. Thanks.
-
August 28th, 2004, 12:56 PM
#9
Re: Change include paths + Visual Studio
sorry to spend your time!
I was using
DirectSound8 m_pdsObject;
and it should be
LPDIRECTSOUND8 m_pdsObject;
Thanks for all the help!
-
August 28th, 2004, 01:06 PM
#10
Re: Change include paths + Visual Studio
Ah, IC, that's okay then ^^ Np! Good luck with your project!
Michael Maier
xplo.re
Project Management
http://xplo-re.com/ [^]
Giving reputation lets one know if a reply has been helpful. Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|