[airstrike] Windows problems
Eero Tamminen
oak at welho.com
Sun Jun 6 15:19:06 EDT 2004
Hi,
> Okay some information from my side
>
> I'm using the C++ compiler from MSVC 6.0, (/TP)
>
> I did this because he doesn't understand the construction INLINE
>
> The definition of INLINE = inline, but that doesn't make any sense.
It's a define so that you can easily set it either to "Inline" i.e. the C99
standard for inlining functions, or empty if your C-compiler doesn't
support function inlining.
> For example:
>
> static INLINE void clear_it(sprite_t **pos, sprite_t *it)
>
> C:\cvs\airstrike\src\sprites\bonus.c(105) : error C2059: syntax error :
> 'constant'
In 'core/compat.h' there's this piece of platform compatibility:
-----------
/* Define INLINE for different compilers. */
#ifndef INLINE
# ifdef __GNUC__
# define INLINE inline
# else
# ifdef _MSC_VER
# define INLINE __inline
# else
# define INLINE
# endif
# endif
#endif
-------------
If MSVC doesn't recognize "inline" keyword at all, the above
define should AFAIK be empty when _MSC_VER is set.
If later versions of MSVC support inlining, then there needs to
be a check for MSVC version, so that it can be defined differently
according to the version.
- Eero
More information about the airstrike
mailing list