[Top][All Lists]

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

[Mingw-cross-env-list] SDL_Pango in mingw-cross-env

From: David Bruce
Subject: [Mingw-cross-env-list] SDL_Pango in mingw-cross-env
Date: Sat, 13 Mar 2010 07:40:45 -0600

Hi Volker,

I think that the vanilla upstream sources for SDL_Pango need to be
patched in order to be useful in mingw-cross-env.  It seems the
upstream author is no longer maintaining SDL_Pango, and thus it gets
patched by distros (for sure by Debian, Fedora, and the MacPorts
project) to deal with a couple of issues.

There are two separate issues.  The first is that SDL_Pango has some
important gaps in its API, including a reasonable means to set the
font size.  This is addressed by "SDL_Pango-0.1.2-API-adds.patch",
which is needed by tuxtype and tuxmath.

The second issue is that SDL_Pango.h has several const variable
declarations of matrices that generate "multiple definition" errors
when I build tuxtype.  I had encountered the same error previously if
I had "#include SDL_Pango.h" in more than one source file within
tuxtype.  It seems to me that this error occurs upon static linking
but not with dynamic linking (although I am not quite knowledgable
enough about the linker to know if this is plausible).  Anyway, it
appears to be a programming error within SDL_Pango, since AFAIK
variables within header files should be "externed" and defined within
a *.c file, or alternatively declared/defined "static" within the
header.  I rebuilt SDL_Pango within mingw-cross-env on my own machine
after making these constants static, and it eliminated the error.  The
second patch, "SDL_Pango-0.1.2-matrix_declarations.patch", addresses
this issue using the "extern" approach rather than making them
"static" as I did.

Both of the patches were downloaded from Fedora.



Attachment: SDL_Pango-0.1.2-API-adds.patch
Description: Text Data

Attachment: SDL_Pango-0.1.2-matrix_declarations.patch
Description: Text Data

reply via email to

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