> I'm trying to build FlightGear 0.9.1 on Windows 98 using MSVC 6.0.
> However, I get a series of "operator is ambiguous" errors in mk4.inl
from
> Compiling...
> runways.cxx
> e:\flightgear\src\flightgear-0.9.1\src\include\config.h(5) : warning
C4005:
> 'ENABLE_PLIB_JOYSTICK' : macro redefinition
>         unknown(0) : see previous definition of 'ENABLE_PLIB_JOYSTICK'
> e:\flightgear\src\metakit-2.4.9.2\include\mk4.inl(169) : error C2593:
> 'operator ==' is ambiguous

>>  Do you have MSVC service pack 5 installed ? I am not seeing this here.
>>  -Fred

As Fred says, sp5 is probably essential. You can download it from MS,
or it is in the MSDN pro+ sub ...

... from my experience with msvc ...,
(a) you should deal the the first error or warning *FIRST*,
unless you already sort of 'know' what it is, and
(b) unless the 2nd, 3rd, etc 'errors/warnings' sort of 'make sense',
it is better to do a recompile of just that module - runways.cxx
- after each first fix, over and over, until it compiles 'correctly' ...
if this makes sense ...

For the macro warning, of course i do not know exactly, but it
seems you are using the zip or cvs version of FlightGear.dsp,
which defines ENABLE_PLIB_JOYSTICK on the
command line of the compiler. See
Project / Settings / C++ tab / Preprocessor category
definitions: (you may have to scroll to the end to see it)

And i guess you copied or renamed config.h-msvc6 to
config.h, which *also* defines
ENABLE_PLIB_JOYSTICK, without an #ifndef
bracket in an older version, hence the compiler's
belch - C4005 - macro redefinition! - i guess ...

i think the command line sets it to 1, while the config.h
defines it true, or something like that ... not exactly
a 'redefinition' in my book, but i am not the compiler's
coder :-)(

The fix is to remove one of the 'definition', *or*
since you may compile other FG/TG projects that use
the common FG/src/include/config.h, then you can add
an #ifndef around the config.h definition, as it
is in a later cvs version (ver 23Jul03), like -

/* Define to enable plib joystick support */
#ifndef  ENABLE_PLIB_JOYSTICK
#define ENABLE_PLIB_JOYSTICK
#endif   // #ifndef  ENABLE_PLIB_JOYSTICK

so you do NOT have to 'remember' to add it
as a Preprocessor to each project ... note, most
others here use an auto-gen tool in their build
environment to write config.h, thus have no need
for the single config.h-msvc6 we're using ... or you
may want to try the cygwin env...

This may?! help with the mk4.inl errors, but maybe not :-((

I seem to remember 'seeing' this once or twice before,
and sort of remember the 'fix' at that time 'seemed'
totally unrelated :-?

Hope this helps... Tell more if not, like have you already
successfully compiled metakit (with SimGear)? Is this
debug or release? Is it the same in both? I do remember
some 'strange' #define NDEBUG in metakit, but ... Which
source zip or cvs? etc, etc ...

My 'cvs up -dP' src, albeit a few weeks old now, compiles
fine in win98 se, using msvc6, with sp5 applied ...
cl Version 12.00.8804 - just to add fuel to another
thread discussing version(s) ... :-))


geoff.

ps: just tried to see how i know sp5 has been applied,
since i know i applied it, but can not find a clue? Any
suggestions where i should look to 'prove' this?



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to