← Back to team overview

cuneiform team mailing list archive

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

 

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

2008/12/29 Jussi Pakkanen <jpakkane@xxxxxxxxx>

> On Thu, Dec 25, 2008 at 3:04 PM, Dmitry Polevoy
> <openocr.polevoy@xxxxxxxxx> wrote:
>
> > I made some changes and built Cuneiform core in MSVC++ 6, MSVC++ 9
> (Express)
> > and MinGW with CMake.
> > In cuneiform-cli.cpp I add pack mode to recog many images during one
> session
> > (very usefull for testing).
>
> Unfortunately this patch breaks pretty badly on every non-windows
> platform because of this:
>
> -typedef uint16_t  WORD;
> +
> +// FIXME: MSVC++ 6
> +#if _MSC_VER > 1200
> +typedef uint16_t  WORD;
> +#endif // _MSC_VER > 1200
>
> (and also for UINT etc)
>
> The real fix would, of course, be to get rid of these nonportable
> win32 api variable types, but that is quite a lot of work. What is it
> that you were trying to achieve with these? Why are they necessary?
>
> Also, in the future please send your patches and comments to the
> mailing list and not directly to me. This allows other people to
> follow the developments and offer their comments on code changes.
>

Follow ups