GNOME Bugzilla – Bug 585361
[gstwaveformsink.c] 'byte' is not defined in MSVCRT
Last modified: 2009-08-09 10:55:44 UTC
'byte' is not defined in MSVCRT. Needs to apply this patch: #ifdef _MSC_VER #include <windows.h> #define byte BYTE #endif
The windows.h include is already in the header file, so I guess all that's needed is a define or typedef. However, since this obviously compiled fine with other versions of MSVC, could you tell us for the record what version you're using?
I'm sorry about the late reply. Indead replacing byte with BYTE should solve the issue. I'm using the Visual Studio 8 compiler linking against the CRT provided by the Windows Driver Kit (mvctr.dll), the same CRT used by mingw.
Let's just use guint8 I say. Hope it works, please re-open if not, thanks: commit 2e13b85a016330729a3c6ac39d006d06fc1db996 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Thu Jun 25 18:51:12 2009 +0100 waveformsink: use 'guint8' instead of 'byte' to fix compilation with MSVC8 We need a cast here for pointer arithmetic to work correctly, but some MSVC versions don't seem to like 'byte', so use guint8 here. Hopefully fixes #585361.
All Microsoft types are written in caps, i.e. DWORD, WORD, BYTE, HANDLE. "byte" is an exception - it is defined in Microsoft header <rpcndr.h>, seems to be related to MIDL. Anyway, you shouldn't rely on it, use BYTE instead.
*** Bug 578166 has been marked as a duplicate of this bug. ***