Results 1 to 3 of 3

Thread: ClanLib-2.2.6 MinGW Compiler Suite Patch

  1. #1

    Default ClanLib-2.2.6 MinGW Compiler Suite Patch

    This patch will allow MinGW to compile ClanLib-2.2.6. Tested on MinGW-4.5.2, but with the fixes, in theory, it can compile as early as MinGW-3.4.5

    Before installing, ensure you have the following libraries:
    zlib -
    Freetype -
    Mikmod -
    Ogg -
    Vorbis -
    PCRE -

    FontConfig is only used on X11 files, and as such is not required. This patch reconfigures to reflect it.
    The following macros in their respective files needs to be set:
    • __MSVCRT_VERSION__ should be >=0x0500

    • WINVER should be >= 0x0500

    • _WIN32_IE should be >=0x0500

    This patch also reconfigures to include said libraries if the compiler is MinGW

    What the patch does is add include files and change #if conditionals to route MinGW to the right places, If I added anything, it was to complement the code already included by adding the MinGW headers to the functions that uses them.

    I also noticed that ClanLib uses a lot of unicode-heavy functions, so I added DUNICODE in the flags and added conditionals to #define _UNICODE prior to including tchar.h if in MinGW. It will not install otherwise.

    And finally the patch adds conditionals to for win32 files not included.

    Also note that MinGW-4.5.2 does not have all the source files. It's missing some, but I forgot to document them.

  2. #2
    ClanLib Developer
    Join Date
    May 2007


    I have applied your patch to ClanLib 2.2 SVN (and 2.3 svn)

    I noticed your patch file had modifications to, is a generated file. (The source file is

    If you have time, please can you test the ClanLib 2.2 SVN on MinGW.

  3. #3


    I have tested it and it compiles successfully.

    I'm testing to see if I can find problems.

Similar Threads

  1. Large compiler error.
    By Taterade in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 12-21-2010, 03:43 AM
  2. Compiling ClanLib MinGW Error
    By FlaPenguin in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 02-20-2009, 08:27 PM
  3. ClanLib on DevC++/mingw, among other problems
    By NiMa in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 11-11-2008, 06:15 AM
  4. Patch to ClanLib-0.9 svn rev 365
    By rombust in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 05-09-2007, 01:08 PM
  5. Toolfish Utility Suite V2.00 is released
    By Seth in forum Other RTsoft Games
    Replies: 0
    Last Post: 02-26-2003, 12:48 PM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts