# DirectX SDK (June 2010) – VS2022 Setup Steps  
*(Fully self‑contained Markdown, safe to save as .md)*

```
# DirectX SDK (June 2010) - Setup for Visual Studio 2022
This guide shows how to make DirectX (especially DirectSound, DirectInput, XAudio2, etc.) usable in Visual Studio 2022.

---

## 1. Install the DirectX SDK (June 2010)
Download and install:
- **DirectX SDK (June 2010)**  
  File name: `DXSDK_June2010.exe`

After installation, the SDK is normally located at:
```
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\
```

---

## 2. Fix the DXERR header conflict (required for VS2015+ / VS2022)
The SDK ships with an old `dxerr.h` and `dxerr.lib` that conflict with the Windows 10 SDK.

### Remove or rename these three files:
```
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\dxerr.h
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86\dxerr.lib
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x64\dxerr.lib
```

You can simply rename them:
```
dxerr.h.bak
dxerr.lib.bak
```

---

## 3. Open the **native C++ project** (not C#)
DirectX paths must be added to:
- **C++**
- **C++/CLI**
- **native static library (.lib)**

C# projects do **not** expose VC++ Directories.

---

## 4. Add DirectX include + library paths
Open:
```
Project → Properties → Configuration Properties → VC++ Directories
```

### Add Include Directory:
```
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include
```

### Add Library Directory (choose x86 or x64 depending on your build):
```
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86
```
or
```
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x64
```

---

## 5. Link required DirectX libraries
Open:
```
Project → Properties → Linker → Input → Additional Dependencies
```

Add the libraries you need:

### For DirectSound:
```
dsound.lib
dxguid.lib
winmm.lib
```

### For DirectInput:
```
dinput8.lib
dxguid.lib
```

### For XAudio2 (old SDK version):
```
xaudio2.lib
```

---

## 6. Optional: Disable “SDL checks” if your old code uses unsafe patterns
Open:
```
Project → Properties → C/C++ → General → SDL checks
```
Set:
```
SDL checks: No
```

---

## 7. Clean + Rebuild
Perform:
```
Build → Clean Solution
Build → Rebuild Solution
```

If include paths and libs are correct, DirectX will compile normally.

---

## 8. Verify with a simple include test
Add to a .cpp file:
```cpp
#include <dsound.h>
#include <dinput.h>
#include <xaudio2.h>
```

If IntelliSense resolves these headers, your setup is correct.

---

# End of Document
```

---

If you want, I can also generate a **shorter printable version**, or a **project‑specific version** once you tell me the name of the C++ project inside your solution.