Found the problem with building SDL_gfx on Windows OS:

Hi,

Found the problem with building SDL_gfx on Windows OS:

/* ----- AA Ellipse */

/* Win32 does not have lrint, so provide a local inline version */
#ifdef WIN32

__inline long int
lrint (double ftl)
{
int intgr;
_asm
{
fld flt
fistp intgr
};
return intgr;
}

#endif

Above code fails on:
_asm
(on Windows OS)

How I fix this?

Please look at this screenshot of this error:
http://silentheroproductions.com/images/Dev_C-l--l-_SDL_gfx_ERRORS.gif

Jesse “JeZ+Lee” Palser
SLNTHERO at aol.com
Silent Hero Productions®
Video Game Design Studio
http://www.SilentHeroProductions.com

That’s a simple assembly-code routine. Check your compiler’s documentation to see what command it recognizes for inline assembly code.>----- Original Message ----

From: Jesse P.
Subject: [SDL] Found the problem with building SDL_gfx on Windows OS:

Hi,

Found the problem with building SDL_gfx on Windows OS:

/* ----- AA Ellipse */

/* Win32 does not have lrint, so provide a local inline version */
#ifdef WIN32

__inline long int
lrint (double ftl)
{
int intgr;
_asm
{
fld flt
fistp intgr
};
return intgr;
}

#endif

Above code fails on:
_asm
(on Windows OS)

How I fix this?

Please look at this screenshot of this error:
http://silentheroproductions.com/images/Dev_C-l--l-_SDL_gfx_ERRORS.gif

i think coping the error here works best. (not all of it either, should
be a few lines only.

mattOn Sat, 5 Jul 2008, Jesse P. wrote:

in this case asm is not needed.

the #ifdef WIN32 should be changed to

#ifdef HAVE_LRINT or something.

and if asm is needed, thats not portable anyway.On Sat, 5 Jul 2008, Mason Wheeler wrote:

That’s a simple assembly-code routine. Check your compiler’s documentation to see what command it recognizes for inline assembly code.

----- Original Message ----
From: Jesse P.
Subject: [SDL] Found the problem with building SDL_gfx on Windows OS:

Hi,

Found the problem with building SDL_gfx on Windows OS:

/* ----- AA Ellipse */

/* Win32 does not have lrint, so provide a local inline version */
#ifdef WIN32

__inline long int
lrint (double ftl)
{
int intgr;
_asm
{
fld flt
fistp intgr
};
return intgr;
}

#endif

Above code fails on:
_asm
(on Windows OS)

How I fix this?