Edit: Of course, immediately after working on it for an hour then posting here, I found the stupid mistake...
I'm getting compiler errors when trying to #include <d3dx9.h>
in a project. I'm receiving "fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory".
$(DXSDK_DIR)Include;$(IncludePath)
" and "$(DXSDK_DIR)Lib\x86;$(LibraryPath)
" for Include and Library directories respectively for all configurations—and the environment variable %DXSDK_DIR%
points to C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\
as expected.$(DXSDK_DIR)include
listed in the Additional Include Directoriesd3dx9d.lib
included for Debug and d3dx9.lib
included for Release configuration.d3dx9.h
and suggest type and function names that are within the file (and not included through anything else I'm #include
ing) so it seems that Intellisense can find it.Any suggestions on what I'm forgetting or what else to try?
Thanks
you forgot one thing:
$(DXSDK_DIR)LIB\x86
Done. Hope this helps
You should make sure you have ALL paths sorounded by quotes (").
Instead of $(DXSDK_DIR)include
you should have "$(DXSDK_DIR)include"
I didn't realize that one of the other projects in the solution was #include
ing a file that was #include
ing a file that was #include
ing d3dx9.h
and I hadn't added those paths to that project.
/facepalm
Find the file on your computer, and add it's folder to the properties of your project.
Assuming you have visual studio: Properties/C/C++/General/Additional Include Libraries
.
I tried all of these suggestions and none worked.
Turns out the $(DXSDK_DIR) variable doesn't work if you install DirectX while Visual Studio is still running. The solution for me was to restart Visual Studio (+ adding the paths in the solutions listed above, of course).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With