AggrorJorn Posted May 31, 2013 Posted May 31, 2013 After doing a rebuild of my entire project I get several errors in the winuser.h. I have never touched that file nor have I updated the project via the leadwerks updater. I checked out an older version via GIT but the problem remains. Any idea what this could be? typedef struct tagINPUT { DWORD type; union { MOUSEINPUT mi; KEYBDINPUT ki; HARDWAREINPUT hi; }; } INPUT, *PINPUT, FAR* LPINPUT; WINUSERAPI UINT WINAPI SendInput( __in UINT cInputs, // number of input in the array __in_ecount(cInputs) LPINPUT pInputs, // array of inputs __in int cbSize); // sizeof(INPUT) Quote
Furbolg Posted May 31, 2013 Posted May 31, 2013 Hi Aggror, it's a standard windows header file. Try to Clean Solution + Rebuild Solution and restart Visual Studio before doing this. Quote
shadmar Posted May 31, 2013 Posted May 31, 2013 When using git checking out branches, I always have to close VS2010, git checkout, open VS2010, clean solution, rebuild. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB
AggrorJorn Posted May 31, 2013 Author Posted May 31, 2013 Thanks for the answer guys. Unfortunately, it hasn't gone away. I tried the following steps. I closed visual studio. I did a hard reset on the last commit where everything worked. I closed GIT (just to be sure) I opened up visual studio I cleaned the solution and did a rebuild Quote
Furbolg Posted May 31, 2013 Posted May 31, 2013 Strange, the winuser.h is an windows header, i don't think it's contained in leadwerks. Did you tried to restart your computer ? Quote
AggrorJorn Posted June 1, 2013 Author Posted June 1, 2013 Yeah I tried it with no result. I have lost to much time allready so I am going to try and create a new project and add all the code manually. Quote
AggrorJorn Posted June 1, 2013 Author Posted June 1, 2013 I found it. After recreating a new project and copying everything over I still got the error. Then I spotted something in a class: #ifndef ENGINE_INPUT #define INPUT I have my own class for handling input. The define segment doesn't define my class because I forgot to give it a different name. Coincidental, input is already used by the winuser.h, causing the error. Quote
Furbolg Posted June 1, 2013 Posted June 1, 2013 You should name your #define macros like XXX_INPUT, where XXX stands for your project or your favorite name. That's also a good scenario why c++ programmer use namespace and why "using namespace" shouldn't be in header files (if your #define would be a const int input = 0x01 for example and windows.h (or some other header) using the same variable name, you would have similiar problems). Good to see, you could resolve your problem *cheers* Quote
AggrorJorn Posted June 1, 2013 Author Posted June 1, 2013 Don't my class names also have to be prefixed with "XXX_" as well then? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.