Question

So I am trying to build an 32 bit application in 64. I am linking to all 64 bit libraries, and I have recompiled everything we used for 64 bit.

I am getting weird errors now. I have seen some similar errors over the net but nothing useful in those topics.

Any idea what could be wrong that causes this behavior?

warning C4091: 'typedef ' : ignored on left of 'float' when no variable is declared C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\windef.h error C2632: 'float' followed by 'double' is illegal
C:\Program Files\MicrosoftSDKs\Windows\v6.0A\include\windef.h

warning C4091: 'typedef ' : ignored on left of 'double' when no variable is declared C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\wtypes.h Error 44 error C2632: 'double' followed by 'double' is illegal
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\wtypes.h

Warning and error are for the same line. Clearly its not a problem with wtypes.h and windef.h (and if it was i cant do anything about it)

typedef float               FLOAT;

typedef double DOUBLE;

Clearly these are fine by itself so it has to be something else. File in my project that causes this just includes

Any ideas?

Was it helpful?

Solution

It looks like FLOAT and DOUBLE have been previously #defined to double. This might be a result of another library, although it seems unlikely to be caused by switching to 64-bit compilation. Try doing

#undef FLOAT
#undef DOUBLE

Prior to including windows.h or windef.h or whichever file is directly responsible for the warning.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top