Changeset 1653


Ignore:
Timestamp:
Jul 19, 2012, 7:07:37 PM (7 years ago)
Author:
sam
Message:

build: add libSDLmain.a binaries for GUI MinGW builds; the provided static
libraries only work with the Visual Studio runtime.

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r1647 r1653  
    126126dnl  Are we building using MinGW?
    127127LIBS_save="$LIBS"
    128 LIBS="$LIBS -mwindows"
    129 AC_MSG_CHECKING(for -mwindows)
     128LIBS="$LIBS -mwindows -mwin32"
     129AC_MSG_CHECKING(for -mwindows -mwin32)
    130130AC_TRY_LINK([], [],
    131131 [AC_MSG_RESULT(yes)
    132   LOL_LIBS="${LOL_LIBS} -mwindows"],
     132  CXXFLAGS="${CXXFLAGS} -mwindows -mwin32"
     133  LOL_LIBS="${LOL_LIBS} -uWinMain -u_WinMain@16"],
    133134 [AC_MSG_RESULT(no)])
    134135LIBS="$LIBS_save"
     
    264265 [SDL_LIBS="${SDL_LIBS} -lSDL"],
    265266 [ac_cv_my_have_sdl="no"])
     267AC_CHECK_LIB(SDLmain, main,
     268 [SDL_LIBS="${SDL_LIBS} -lSDLmain -lSDL"])
    266269AC_CHECK_LIB(SDL_mixer, main,
    267270 [SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"],
  • trunk/contrib/NOTES

    r1586 r1653  
    3939Download page: http://www.libsdl.org/release/
    4040
    41 Just take the pre-compiled binaries from upstream (for VC). For other
    42 ways to build SDL, see older versions of this document.
     41- take the pre-compiled binaries for Visual C++
     42- take the pre-compiled libSDLmain.a for 32-bit mingw32
     43
     44- download the source and build libSDLmain.a for 64-bit mingw32
     45  (note: CPPFLAGS=-D_CRTIMP= used to be needed)
     46
     47    ./configure --host=x86_64-w64-mingw32
     48    make build/libSDLmain.la
     49
     50- copy build/.libs/libSDLmain.a
    4351
    4452
  • trunk/src/core.h

    r1649 r1653  
    6767#endif
    6868
    69 /* If using SDL and Visual Studio, let it override main() */
    70 #if defined USE_SDL && (defined _MSC_VER || defined __APPLE__)
     69/* If using SDL on Windows or OS X, let it override main() */
     70#if defined USE_SDL && (defined _WIN32 || defined __APPLE__)
    7171#   include <SDL_main.h>
    7272#endif
Note: See TracChangeset for help on using the changeset viewer.