gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Re: Development for Win32


From: zou lunkai
Subject: [Gnash-dev] Re: Development for Win32
Date: Fri, 21 Nov 2008 20:51:25 +0800

On Fri, Nov 21, 2008 at 12:26 PM, Tonko Juricic <address@hidden> wrote:
> On Tue, Nov 11, 2008 at 5:48 AM, zou lunkai <address@hidden> wrote:
>
>
>> Right, using gtk on native windows is really not a good choice.  You
>> may consider SDL though, it's pretty simple and portable and works
>> well on Windows.  The SDL related code in Gnash should compile without
>> any difficulty. And SDL is well documented over the internet, and
>> there are many examples.
>>
>> The only problem with native GUI is that it's not portable at all. But
>> I guess you should be very familar with it, so it's might be your good
>> choice.  Anyway, take a look at "sdl.cpp" and "sdl_agg_glue.cpp"
>> before the final decision:)
>>
>> http://www.libsdl.org/download-1.2.php
>>
>> There's binary lib for windows, I can confirm it is stable.
>
> libmedia includes SDL.h so I had to get the library anyway. A minor
> problem that I have with it is that Windows library version on that
> site is for Visual Studio 2005. Porting it to VS 2008 is usually quick
> and painless. Nevertheless, I contacted author Sam Lantinga to see if
> any upgrade is already underway or if he maybe can use some help to
> create it, but a week has passed and he hasn't responded.
>
> A bigger problem with this library is that I need to modify its
> sdl_config_win32.h header because these definitions:
>
> #if defined(__GNUC__) || defined(__DMC__)
> #define HAVE_STDINT_H   1
> #elif defined(_MSC_VER)
> typedef signed __int8           int8_t;
> typedef unsigned __int8         uint8_t;
> typedef signed __int16          int16_t;
> typedef unsigned __int16        uint16_t;
> typedef signed __int32          int32_t;
> typedef unsigned __int32        uint32_t;
> typedef signed __int64          int64_t;
> typedef unsigned __int64        uint64_t;
>
> They cause compiler redefinition errors because Gnash already uses
> equivalent boost definitions. As you can see it happens only for MS
> C/C++.
>
> This is the first time that I need to modify dependent code so is
> there some preferred way to go about it?
>

I guess you could probably drop those typedefs for MSVC, because SDL
headers don't really need it.

typedef char            Sint8;
typedef unsigned char   Uint8;
typedef short           Sint16;
typedef unsigned short  Uint16;
typedef int             Sint32;
typedef unsigned int    Uint32;

I found above  are the common types used in SDL.  And modifying
sdl_config_win32.h shouldn't be a bad idea, it's a config file anyway.

--zou




reply via email to

[Prev in Thread] Current Thread [Next in Thread]