I can get things to work&link this way
1) compile PDFKit against freetype with the standard freetype-config
--libs
options, which would be -lfreetype, this completes without error
2) when using PDFKit (in this case GWorkspace) I need to again add
-lfreetype to be able to link against PDFKit
my understanding is that you should not need 2). Having a closer look
at
PDFKit it seems the problem is the order of link arguments in the
PDFKit
GNUmakefile.in, which effectively means you are not linking the
PDFKit
framework at all with the freetype-config --libs option. Note that
the order
of arguments on the linker command line is important. In particular
any -l
options MUST follow the object files that use the respective
libraries,
otherwise those libraries are simply not used during linking. So,
instead of
ADDITIONAL_LDFLAGS += $(LIB_FREETYPE_LDFLAGS)
ADDITIONAL_LDFLAGS += $(XPDF_OBJ_FILES) -lm
you should use
ADDITIONAL_LDFLAGS += $(XPDF_OBJ_FILES) -lm
ADDITIONAL_LDFLAGS += $(LIB_FREETYPE_LDFLAGS)