1

I'm running into some problems compiling my C++ project.

It says: "d3dx9.h: no such file or directories" when I try to compile it.

Things I've tried so far.

  1. Reinstall DirectX SDK (2010 June)
  2. Add it to the environment path
  3. Grabbing the d3dx9.h file from github and putting it in my project folder
jww
  • 97,681
  • 90
  • 411
  • 885
fragile
  • 61
  • 1
  • 3
  • 7
  • You should show the full command line of attempting to compile the source file. You should also provide the exact error message. I doubt it says *"... file or directories"*. – jww Jun 02 '18 at 19:34
  • [COMMAND] g++ dllmain.cpp [OUTPUT] In file included from dllmain.cpp:2:0: stdafx.h:20:19: fatal error: d3dx9.h: No such file or directory #include ^ compilation terminated. – fragile Jun 02 '18 at 19:39
  • 1
    Depending on the compiler `#incude ` may or may not look in the current directory. Try `#include "d3dx9.h" ` source: http://en.cppreference.com/w/cpp/preprocessor/include – Richard Critten Jun 02 '18 at 20:09

0 Answers0