Very annoying/meaningless warning

Started by
10 comments, last by jollyjeffers 18 years, 10 months ago
c:\steve\sdk\directx 9.0 sdk (february 2005)\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800 How can I eliminate this??? It is very bothersome to have popping up every compile.
Advertisement
The purpose of that error is to let you choose what version of DirectInput to use. dinput.h will generate structures depending on what you define. If you don't define anything, you get that error and DirectInput version 8 is assumed. To get rid of that error, define DIRECTINPUT_VERSION before you include dinput.h. Since you are using DirectX9, you should probably define it as 0x0800 because, if I remember right, DirectInput was not updated in version 9.
....[size="1"]Brent Gunning
Instead of defining DIRECTINPUT_VERSION to 0x0800 in the source files, before including <dinput.h>, you can define it project-wide.

How do I #define project wide?
project properties -> c/c++ -> Preprocessor -> Preprocessor definitions

In VC++ 7.0 and 7.1 at least.
That is what I did already assuming that was how you defind project wide.
I rebuilt the entire project and I still get the warning anywhere that includes <dinput.h>

So defining DIRECTINPUT_VERSION 0x0800 did not work in the preprocessor definitions.
You should define at every point prior to the include.

My advice, dinput is a specific API that (project design permitting) should be included only once somewhere (with the define just before it).
Just out of curiosity, how many times per translation unit are you #include'ing direct input??

I suppose it's a matter of personal preferance but the single time it appears in my build log never bothered me [smile]. What bothers me is the several hundred "NYI" messages [sad]

Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

"NYI"?
I'm lingo anept :)


I only include dinput in my cInputLayer class.
But, there is another class which needs access to the input layer so it has to include the cInputLayer header.

Currently I am seeing that warning twice due to that reason.




Edit:
Okay i solved it, I was just being stupid, I am only including dinput.h once so I just added that line to the input layer.

I'd still like to know what NYI stands for.
Quote:Original post by Halsafar
I'd still like to know what NYI stands for.

A google for NYI acronym reveals: Not Yet Implemented as a first hit, in the acronym dictionairy.

This topic is closed to new replies.

Advertisement