D2D1_Pixel_Format undefined

Oct 9, 2013 at 6:24 PM
Good day.

I downloaded the source directly from here, attempted to compile and was given the following errors when attempting to compile Hieroglyph3_Desktop.

Sorry if this is a duplicate, I couldn't find anything else on this issue.

Any help would be appreciated.
Error   29  error C2146: syntax error : missing ';' before identifier 'PixelFormat' c:\program files (x86)\windows kits\8.0\include\um\wincodec.h   881

Error   30  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\windows kits\8.0\include\um\wincodec.h   881

Error   31  error C2146: syntax error : missing ';' before identifier 'PixelFormat' c:\program files (x86)\windows kits\8.0\include\um\wincodec.h   881

Error   32  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\windows kits\8.0\include\um\wincodec.h   881

Error   40  error C2146: syntax error : missing ';' before identifier 'PixelFormat' c:\program files (x86)\windows kits\8.0\include\um\wincodec.h   881

Error   41  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\windows kits\8.0\include\um\wincodec.h   881

    42  IntelliSense: identifier "D2D1_PIXEL_FORMAT" is undefined   c:\Program Files (x86)\Windows Kits\8.0\Include\um\wincodec.h   881

Coordinator
Oct 10, 2013 at 2:12 AM
Hello,

Can you tell me which operating system you are using, and also which version of visual studio you are using? Normally this error happens when you try to use the Windows Store version of Visual Studio, as opposed to the desktop version. Once I know this info, we can start to diagnose what is going on.
Jason
Oct 10, 2013 at 8:49 AM
Somehow forgot to add that.

Windows 7 Home Premium Service Pack 1

Visual Studio Ultimate 2012 Version 11.0.60610.01 Update 3
Coordinator
Oct 11, 2013 at 2:34 AM
Hmmmm, that is actually the same setup that I am using right now. Can you try to download and run one of the DXSDK samples? It seems like there is an issue with your path and/or your include files. Have you changed any default setting in the VS IDE?

To the best of my knowledge, with the stock installation of VS2012 on Win7 you should be ready to compile right out of the box.
Oct 11, 2013 at 10:05 AM
I'll install these things on a fresh machine and see what it does. As far as I remember I've changed none of the default settings on VS2012, the path might have been altered though.

I'm not sure where to find any DXSDK samples, any hope of a link? I'll update you when I install on a fresh machine hopefully today.
Oct 23, 2013 at 12:34 PM
Right...installed on a new machine and it works fine...so now I'm confused.

I will do a clean install of VS2012 on my home machine and hopefully that will fix it.
Coordinator
Oct 23, 2013 at 1:09 PM
Sounds strange... there must be something which has been changed on the original machine you were talking about. You can get some sample programs here.
Oct 23, 2013 at 4:36 PM
Problem clearly has to do with my first machine. Though I am not sure what.

Every tutorial there failed with the error "Error 1 error C3861: 'D3DCompileFromFile': identifier not found" except for Tutorial 1.
Coordinator
Oct 23, 2013 at 5:05 PM
Both of the errors that you mentioned sound like you are trying to use a Windows Store version of Visual Studio to compile these desktop based programs. Is it possible that you have one of the express editions installed along with your ultimate install? If so, then it would be possible that the express edition was getting loaded when you open the solution file...

That is kind of a long shot, but both the D2D1 missing and the lack of D3DCompileFromFile both sound like store app issues.
Oct 23, 2013 at 6:17 PM
I think the clean install should fix the issue. I appreciate all the help I just...have no idea how I might have gotten that version on my machine is all.

Thanks again!
Oct 23, 2013 at 7:58 PM
Oh boy am I an idiot!

I was compiling under Win 32, not 64. Once I switched to 64...it all worked. Not sure how I missed that.
Marked as answer by Haegr on 10/23/2013 at 11:58 AM