[cairo] Building on Windows

cu cairouser at yahoo.com
Sun Feb 15 07:29:11 PST 2009


FWIW I found that it is much easier to build Cairo for Windows using
Visual Studio itself. I created a new project (library), added
appropriate cairo source files (look for files needed for each specific
feature in the unix src/Makefile.in), and built it. There were a few
variables that needed to be set in config.h file, simply read through it
and set as appropriate for your platform.

If you have trouble doing this, I can post my VC project file for Cairo.
--M

Rupinder Singh wrote:
> Hello,
>
> I'm having some trouble building cairo-1.8.6 on Windows (
> http://cairographics.org/download/ ). Here is my altered
> start-msvc9.bat (relevant part):
>
> *
> if "%VC9DIR%"=="" (
>     rem Prepend SDK paths - Don't use the SDK SetEnv.cmd because it
> pulls in
>     rem random VC paths which we don't want.
>     rem Add the atlthunk compat library to the end of our LIB
>     set PATH=%SDKDIR%\bin;%PATH%;C:\mozilla-build\msys\bin;
>     set
> LIB=%SDKDIR%\lib;%LIB%;%MOZBUILDDIR%atlthunk_compat;C:\zlib-1.2.3\projects\visualc6\Win32_LIB_Release;C:\libpng-1.2.34\projects\visualc71\Win32_LIB_Release;
>
>     if "%USEPSDKATL%"=="1" (
>         if "%USEPSDKIDL%"=="1" (
>             set
> INCLUDE=%SDKDIR%\include;%PSDKDIR%\include\atl;%PSDKDIR%\include;%INCLUDE%;C:\libpng-1.2.34;C:\zlib-1.2.3;C:\cairo-1.8.6\src;C:\cairo-1.8.6\boilerplate;C:\pixman-0.14.0\pixman;
>         ) else (
>             set
> INCLUDE=%SDKDIR%\include;%PSDKDIR%\include\atl;%INCLUDE%;C:\libpng-1.2.34;C:\zlib-1.2.3;C:\cairo-1.8.6\src;C:\cairo-1.8.6\boilerplate;C:\pixman-0.14.0\pixman;
>         )
>     ) else (
>         if "%USEPSDKIDL%"=="1" (
>             set
> INCLUDE=%SDKDIR%\include;%SDKDIR%\include\atl;%PSDKDIR%\include;%INCLUDE%;C:\libpng-1.2.34;C:\zlib-1.2.3;C:\cairo-1.8.6\src;C:\cairo-1.8.6\boilerplate;C:\pixman-0.14.0\pixman;
>         ) else (
>             set
> INCLUDE=%SDKDIR%\include;%SDKDIR%\include\atl;%INCLUDE%;C:\libpng-1.2.34;C:\zlib-1.2.3;C:\cairo-1.8.6\src;C:\cairo-1.8.6\boilerplate;C:\pixman-0.14.0\pixman;
>         )
>     )
> )
> *
>
>
> At the command prompt, upon running the batch file, I get:
>
>
> *"Mozilla tools directory: C:\mozilla-build\"
> Visual C++ 6 directory:
> Visual C++ 7.1 directory:
> Visual C++ 8 directory:
> Visual C++ 8 Express directory: C:\Program Files\Microsoft Visual
> Studio 8\VC\
> Visual C++ 9 directory: C:\Program Files\Microsoft Visual Studio 9.0\VC\
> Visual C++ 9 Express directory: C:\Program Files\Microsoft Visual
> Studio 9.0\VC\
>
> Platform SDK directory:
> Platform SDK version:
> Setting environment for using Microsoft Visual Studio 2008 x86 tools.
> Framework32\v2.0.50727 was unexpected at this time.
> *
> Then I shift to cairo\src:
>
> *C:\>cd cairo-1.8.6\src
> C:\cairo-1.8.6\src>C:\mozilla-build\msys\local\bin\make.exe -f
> Makefile.win32 CFG=debug
> C:\cairo-1.8.6\src>
> *
> & nothing is built.
>
> Kindly Help
> Rupinder
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo



More information about the cairo mailing list