From: Thomas Perl Date: Mon, 17 Aug 2009 21:43:22 +0000 (+0200) Subject: Apply fixes and documentation notes for Windows builds X-Git-Tag: tennix-1.1~6 X-Git-Url: https://repo.or.cz/w/tennix.git/commitdiff_plain/07e8b2e7d414aee22f7a388b12da7b941ae09a31 Apply fixes and documentation notes for Windows builds Back in February when I was building Tennix on Win32, there have been some changes (to get Tennix to compile under mingw32) that have not yet been re-integrated. This patch fixes the DLLINTERFACE issues on Win32. It also describes some library linking notes in README.win32. --- diff --git a/README.win32 b/README.win32 index 18a6748..2aea90a 100644 --- a/README.win32 +++ b/README.win32 @@ -67,9 +67,18 @@ Thomas Perl , 2007-11-21 ===================== -Enjoy, - thp 2007-05-12 +#######======------ --- -- - - +Additional notes on libraries on Win32 +#######======------ --- -- - - +You might have to add some libraries for Tennix 1.0 (and later) to compile +correctly under mingw32: -Updated: 2009-02-24 + -lws2_32 -lkernel32 + +This can be set as LDFLAGS and/or LIBS variable in the makefile. For some +specific makefile targets (e.g. the "archive" utility), you might have to +specify "-lws2_32" directly in the target to get the build going. + +#######======------ --- -- - - diff --git a/SDL_rotozoom.c b/SDL_rotozoom.c index ddbc013..59af289 100644 --- a/SDL_rotozoom.c +++ b/SDL_rotozoom.c @@ -6,10 +6,6 @@ */ -#ifdef WIN32 -#include -#endif - #include #include diff --git a/SDL_rotozoom.h b/SDL_rotozoom.h index 99c022a..da5caba 100644 --- a/SDL_rotozoom.h +++ b/SDL_rotozoom.h @@ -44,16 +44,6 @@ extern "C" { /* ---- Prototypes */ -#ifdef WIN32 -#ifdef BUILD_DLL -#define DLLINTERFACE __declspec(dllexport) -#else -#define DLLINTERFACE __declspec(dllimport) -#endif -#else -#define DLLINTERFACE -#endif - /* rotozoomSurface() @@ -65,17 +55,17 @@ extern "C" { */ - DLLINTERFACE SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth); + SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth); - DLLINTERFACE SDL_Surface *rotozoomSurfaceXY + SDL_Surface *rotozoomSurfaceXY (SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth); /* Returns the size of the target surface for a rotozoomSurface() call */ - DLLINTERFACE void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, + void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight); - DLLINTERFACE void rotozoomSurfaceSizeXY + void rotozoomSurfaceSizeXY (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight); @@ -90,11 +80,11 @@ extern "C" { */ - DLLINTERFACE SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth); + SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth); /* Returns the size of the target surface for a zoomSurface() call */ - DLLINTERFACE void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight); + void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight); /* @@ -107,7 +97,7 @@ extern "C" { or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. */ - DLLINTERFACE SDL_Surface *shrinkSurface(SDL_Surface * src, int factorx, int factory); + SDL_Surface *shrinkSurface(SDL_Surface * src, int factorx, int factory); /* @@ -115,7 +105,7 @@ extern "C" { */ - DLLINTERFACE SDL_Surface* rotateSurface90Degrees(SDL_Surface* pSurf, int numClockwiseTurns); + SDL_Surface* rotateSurface90Degrees(SDL_Surface* pSurf, int numClockwiseTurns); /* Ends C function definitions when using C++ */ #ifdef __cplusplus