[cairo] Problems with including and calling other libraries in cairo source code
Gerdus van Zyl
gerdusvanzyl at gmail.com
Fri Apr 17 06:52:17 PDT 2009
You do know of cairomm the c++ bindings available from the cairo download page?
On Fri, Apr 17, 2009 at 9:51 AM, 高睿良 <garyleon1984 at gmail.com> wrote:
> Hi all,
> I'm recently working with cairo source code(on Linux). Here is my purpose.
> In cairo, I want to include and call some functions that was in other
> external libraries(e.g libabc.a) which was written in C++.
> Since cairo is written in C, directly complie the source will definitely
> cause a problem.
> I have some idea about this.
> One is to change the code in the libraries written in C++. By define exten
> "C" and doing some wrapping.
> Another idea is compile cairo with g++ and maybe extern them from C to C++.
> I'm trying this option these days. Since cairo is using automake tools,
> I've trying alter "configure.ac" and "Makefile.am" to satisfy
> 1.Compile and linking using g++
> 2.Include my library header
> 3.Link with my library file(xxx.a)
> However, "configure.ac" and "Makefile.am" include in original cairo source
> is very complex and hard to understand.
> I try to add AC_PROG_CXX in "configure.ac" , LDADD = xxx.a in
> "Makefile.am" and AM_CPPFLAGS = /usr/local/include/xxx in src/Makefile.am.
> It seems not work at all.
> Does any one have any idea about this problem?
> I am addressing my sincere thanks to the helper.
> Best Regards to you all
> Gary Gau
> cairo mailing list
> cairo at cairographics.org
More information about the cairo