← Back to team overview

cuneiform team mailing list archive

Re: Patch to build in MSVC++ 6 and pack mode in cuneiform-cli

 

On Tue, Dec 30, 2008 at 12:39 PM, Dmitry Polevoy
<openocr.polevoy@xxxxxxxxx> wrote:

> I try to build ocr-core with MSVC++ 6, so type definition
> typedef uint16_t  WORD
> should be defined for all compilers except MSVC++ 6.
> Now it's important because we should compaire MSVC++ 6 and MSVC++ 9 versions
> to avoid recession.
>
> As a variant
> -typedef uint16_t  WORD;
> +#ifdef WIN32
> +#if _MSC_VER > 1200
> +typedef uint16_t  WORD;
> +#endif // _MSC_VER > 1200
> +#endif // WIN32

This would still give errors on every non-windows platform because
WORD would be undefined.

If it should be defined for all compilers except MSVC 6, should it not
be something like

#if _MSC_VER < 1201
/* Do nothing */
#else
typedef uint16_t WORD;
#endif

Assuming that _MSC_VER is 1200 on MSVC 6 and larger than that on newer
compilers.



Follow ups

References