On 31 Jul 2006, at 13:19 , Bob Jamison wrote:
jiho wrote:
cairo-pdf.h is the header of cairo-pdf.cpp which is a source file of inkscape. so you have it. The problem is elsewhere in fact.
There are three problems IMHO:
- local cairo headers (#include "...) are included instead of
system ones (#include <...). I can understand this is usefull when using a local patched cairo but the defautl in the SVN source should be system libraries i.e. replace #include "cairo.h" #include "cairo-pdf.h" #include "cairo-ft.h" by #include <cairo.h> #include <cairo-pdf.h> #include <cairo-ft.h>
Done
Thanks
- the presence of cairo is not checked in configure and
appropriate include flags are not added to the compilation command. To use system wide header I therefore have to add: export CPPFLAGS="-I$FINK/include -I$FINK/include/cairo/" on OS X. (understand -I/usr/include/cairo/ on linux but maybe this path is checked for headers by default)
Someone on linux can add this, I think.
In fact I think this is to be automated by automake or configure or something like this = by what generates all the -I flags on the compilation command line. Usually we just have export CPPFLAGS="-I$FINK/include" with $FINK=/sw on OS X and then all subpaths (such as -I/sw/include/libpng12 -I/sw/ include/glib-2.0 are generated at configure time).
- l.64: of cairo-pdf.cpp
#ifdef USE_PANGO_CAIRO #include <pango/pangocairo.h> #endif and USE_PANGO_CAIRO is never defined. where does this come from? Even if it is not defined, the build requires pangocairo.h. I don't have pangocairo.h on my system and have no idea in which package it is at the moment (I have pango and pango-dev installed though so it is not in the base version). So this is what is holding the build right now.
(this is not my code, by the way) pango-cairo is a gtk2.8 thing, so I guess the switch is to allow compiling in <=2.6. It really should be HAVE_PANGO_CAIRO. That term would be generated by autoconf, thus the inclusion of config.h.
I think you mean pdf-cairo.cpp. Actually, if you look in pdf-cairo.h, the same include file is mentioned. So, since it is not switched, that is the "not found" you are seeing. That one can be removed, I think, and not having HAVE_PANGO_CAIRO defined should protect your compile from attempting to include the file you don't have.
I've seen this but just after posting (and I added this in the next post, I'll definitely try more before posting). I used your commited changes and it works as expected (i.e. pangocairo.h is not requested) but then I hit the error I reported before, which seems due to the absence of pangocairo.h: extension/internal/pdf-cairo.cpp: In member function 'NR::Point Inkscape::Extension::Internal::PrintCairoPDF::draw_glyphs(cairo_t*, NR::Point, PangoFont*, PangoGlyphString*, bool, bool)': extension/internal/pdf-cairo.cpp:769: error: 'PANGO_GLYPH_EMPTY' was not declared in this scope extension/internal/pdf-cairo.cpp:769: error: 'PANGO_GLYPH_UNKNOWN_FLAG' was not declared in this scope
As pangocairo.h is a 2.8 thing and that switch to 2.8 was delayed to after 0.45 if I recall correctly, could a work around this dependency be found? (GTK+2.8 is not available on the mac currently)
Thanks again.
JiHO --- Windows, c'est un peu comme le beaujolais nouveau : a chaque nouvelle cuvee on sait que ce sera degueulasse, mais on en prend quand meme par masochisme. --- http://jo.irisson.free.fr/