← Back to team overview

cuneiform team mailing list archive

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

 

WORD is defined in windef.h and if use in cttypes.h
typedef uint16_t WORD;
MSVC++ 6 gives following

Compiling...
ctcbase.cpp
D:\cuneiform\branches\cuneiform.0.0.xNix\kern\h\cttypes.h(213) : error
C2371: 'WORD' : redefinition; different basic types
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\windef.h(144)
: see declaration of 'WORD'

I don't know, why there is no such error in MSVC++ 9. In fact I make this
change only to build core under MSVC++ 6.
I agree this define would only be needed on non-windows platforms, but I
don't know that is needed in MinGW.

You last variant is equal to my first attempt (in my opinion). I think in
non MS compilers macros _MSC_VER is not defined and (_MSC_VER < 1201) is
TRUE, so you have troubles.

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

> On Tue, Dec 30, 2008 at 5:01 PM, Jussi Pakkanen <jpakkane@xxxxxxxxx>
> wrote:
>
> > 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
>
> In fact, the definition of WORD should be found in windows.h, right?
> So this define would only be needed on non-windows platforms, whereas
> windows ones should instead just include windows.h or some other
> system header that has these. Is this correct? I have very litte
> Windows coding experience.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~cuneiform<https://launchpad.net/%7Ecuneiform>
> Post to     : cuneiform@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~cuneiform<https://launchpad.net/%7Ecuneiform>
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References