Jump to content
  • Advertisement
Sign in to follow this  
eppo

Using environment variables in include directive

This topic is 2153 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'm trying to get the pre-Windows 8 XAudio2 headers from the DirectX SDK to work under VS2012.
At one point the documentation tells me to add the following line of code...

#include <%DXSDK_DIR%Include\xaudio2.h>

..., which doesn't work: cannot open include file.

I assume this is because it's not possible to literally specify environment variables this way?

Share this post


Link to post
Share on other sites
Advertisement
At one point the documentation tells me to add the following line of code...
#include <%DXSDK_DIR%Include\xaudio2.h>

Do you have a link to the documentation? I'd like to see some context for this code.

I assume this is because it's not possible to literally specify environment variables this way? [/quote]
No, it is not possible. What I'm assuming is implied by the code is:
1. Add $(DXSDK_DIR)\Include to the include path of your Microsoft.win32.cpp.user properties sheet.
2. Add $(DXSDK_DIR)\Lib\x86 to the library path of your Microsoft.win32.cpp.user properties sheet.
3. Include <xaudio2.h>

Share this post


Link to post
Share on other sites
Here is the specific page: http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275.aspx

I already have this working, but the thing is: you have to add the complete path to the header files (#include <C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Include/xaudio2.h>), otherwise they will conflict with the newer headers from the Windows 8 SDK.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!