CFLite old

From kJams Wiki
Revision as of 04:12, 12 August 2008 by Guberif (talk | contribs)
Jump to navigation Jump to search

This page documents how to build CFLite 476.10 such that you can then link to it in your Windows projects, and then blissfully use CFStrings, CFDictionaries, and all the other CFGoodness that CFLite will bring you. For a "quick and dirty" way to just start *using* CFLite on windows (without having to compile it), click here.

On Windows XP or Windows Vista:

  1. Install Cygwin - select (add them by clicking the text labelled Skip) these packages during the install:
  • Devel/gcc-core
  • Devel/gcc-objc
  • Devel/make
  • If you want to debug, also install Devel/gdb.
  1. When you first run cygwin, it may notify you that it needs you to build /etc/passwd and /etc/group. Do this. Your cygwin setup should be ready.
  1. Download ICU4C
  2. Download CFLite 476.13. Ooops! Not available? Try: CFLite 476.10
  3. get FreeBSD's flsl.c source file
  4. Download include.zip (contains /usr/include/*, which includes AvailabilityMacros, AssertMacros and TargetConditionals from 10.5)
  5. you'll need stdint.h and stdbool.h if you're using Microsoft Visual Studio, it doesn't come with the compiler but is part of the C99 standard. I suggest placing these files in your Visual Studio C include folder(C:\Program Files\Microsoft Visual Studio 8\VC\include by default for VS2005), but you can add these on a separate include path if you want to keep your compiler header folder pristine. More details about this file are on Wikipedia. Maybe it would be better to just add this to the include.zip with AvailabilityMacros et al?
  6. Muck with leopard headers
    1. You will need the contents of mach/*, i386/*, malloc/malloc.h, and sys/cdefs.h from xcode 3.0
  7. Apply the patch
  8. run make
  9. Download CFTest source files. This is the test harness sample project.
    * You can ignore the XCode project
    * create a new project in your windows dev environment and add the two .cpp files.
    * the "console.txt" is the example output that it should look like in your console
    * you may need to tweak the relative path for "test.xml" to load properly. Please document any necessary changes to the source code.