[cairo] Problems with including and calling other libraries in cairo source code

高睿良 garyleon1984 at gmail.com
Fri Apr 17 00:51:27 PDT 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20090417/339d8260/attachment.html 


More information about the cairo mailing list