[cairo] Building on Windows part 2

Thorgrimsson, Chris Chris.Thorgrimsson at lamresearch.com
Fri Sep 25 11:00:06 PDT 2009


You will need to append the paths to all the various libs that the
linker will need. Append to CAIRO_LIBS for Makefile.win32.common. I have
pasted a large chunk from my version of the file that shows the hard
coded paths I used. I am sure there is a better way to do this than hard
coding the paths, but this way my quick and dirty way to keep the linker
happy.


CAIRO_LIBS = 'D:/Program Files/Microsoft
SDKs\Windows/v7.0/Lib/gdi32.lib'
CAIRO_LIBS += 'D:/Program Files/Microsoft
SDKs/Windows/v7.0/Lib/msimg32.lib'
CAIRO_LIBS += 'D:/Program Files/Microsoft
SDKs/Windows/v7.0/Lib/user32.lib'

ifeq ($(CAIRO_HAS_PNG_FUNCTIONS),1)
ifeq ($(CFG),release)
CAIRO_LIBS += 'D:/My Documents/Visual Studio
2008/Projects/Cairo/libpng-1.2.40/projects/visualc71/Win32_LIB_Release/l
ibpng.lib'
ifeq ($(CFG),debug)
CAIRO_LIBS += 'D:/My Documents/Visual Studio
2008/Projects/Cairo/libpng-1.2.40/projects/visualc71/Win32_LIB_Debug/lib
pngd.lib'
endif
endif
endif

ifeq ($(CAIRO_HAS_PS_SURFACE)$(CAIRO_HAS_PDF_SURFACE),00)
else
ifeq ($(CFG),release)
CAIRO_LIBS += 'D:/My Documents/Visual Studio
2008/Projects/Cairo/libpng-1.2.40/projects/visualc71/Win32_LIB_Release/Z
Lib/zlib.lib'
ifeq ($(CFG),debug)
CAIRO_LIBS += 'D:/My Documents/Visual Studio
2008/Projects/Cairo/libpng-1.2.40/projects/visualc71/Win32_LIB_Debug/ZLi
b\zlibd.lib'
endif
endif
endif


-Chris

-----Original Message-----
From: cairo-bounces at cairographics.org
[mailto:cairo-bounces at cairographics.org] On Behalf Of Travis Griggs
Sent: Friday, September 25, 2009 8:31 AM
To: cairo list
Subject: [cairo] Building on Windows part 2

Thanks to any who replied to my queries for help.

I chose to go with the wiki page description. I edited the wiki to  
clarify one or two of the steps.

At this point, I've got zlib, libpng, and pixman all built. It all  
seemed to go OK.

The instructions for building cairo say to run:
run make -f Makefile.win32 static CFG=debug (or release)

Which I did, and it compiles. But when it's done, I have a .lib. Which  
I don't want, I don't think. I want a .dll. Peeking in Makefile.win32,  
I see that there's both a 'static' and a 'dynamic' rule, so I tried  
replacing static with dynamic. Unfortunately, I get an error then:

LINK : fatal error LNK1181: cannot open input file 'zdll.lib'
make: *** [release/cairo.dll] Error 2

I'm sure it's something simple, I don't do the makefile thing  
regularly, any help appreciated.

TIA

--
Travis Griggs
Objologist
"Some people are like slinkies, not really good for much, but they can  
bring a smile to your face when you push them down the stairs."

_______________________________________________
cairo mailing list
cairo at cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list