0
votes

I'm using Visual Studio 2013 to create a new MFC Application. I created the application using the setup wizard, left it on all the default values.

When testing if it even runs before adding anything it gave the compile error:

IntelliSense: identifier "D3DCOLORVALUE" is undefined

followed by a lot of:

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Why would this be happening in a stock standard application straight out of the wizard? And how would I get this working?

1
You probbaly forgot to include the appropriate Direct3d header file(s).Jabberwocky
Where would I find the header files to include? And why would I have to manually add this in a stock standard application right out of the creation wizard?TheEvilMetal
D3DCOLORVALUE is Direct3D stuff. In which source file do you have this D3DCOLORVALUE symbol? How exactly did you proceed to create the application with the wizard?Jabberwocky
File -> New -> Project -> Visual C++ -> MFC -> MFC Application -> Ok -> Finish -> F5 -> Yes. Even just doing that recreates this for me. D3DCOLORVALUE is defined in d2dbasetypes.hTheEvilMetal
Correction: The line that gives the error is in d2dbasetypes.h where D2D_COLOR_F is defined as type D3DCOLORVALUE. When I try go to the definition of D3DCOLORVALUE there it gives the error 'A definition for the symbol 'D3DCOLORVALUE' could not be located.'TheEvilMetal

1 Answers

0
votes

d2dbasetypes.h was giving the error when trying to define D2D_COLOR_F. I googled the base type (D3DCOLORVALUE) and found that it's supposed to be in "D3D9Types.h"

I added #include "D3D9Types.h" to the top of the d2dbasetypes header file and it seems to have fixed the problem.

I don't know why this isn't included in the generated code by default...