gtk2.x 静态编译时 需要注意的是 cairo
cairo 1.14.x 使用了 mutex , 用动态方式时 DllMain 中调用了 CAIRO_MUTEX_INITIALIZE ()
在静态编译时不能自动初始化 mutex , 所以 gtk 静态程序出现错误.
需要在 gtk_init() 中加载 CAIRO_MUTEX_INITIALIZE ();
在 gtk_quit_destroy() 中调用 CAIRO_MUTEX_FINALIZE ();
-------------------------------------------------------------------------------------------------------
build static libs
-------------------------------------------------------------------------------------------------------
export LIBFFI_CFLAGS=" -I/usr/local/lib/libffi-3.2.1/include " \
export LIBFFI_LIBS=" -lffi " \
export ZLIB_CFLAGS=-I/usr/local/include \
export ZLIB_LIBS=-lz \
export CFLAGS=" -I/usr/local/include -O2 -Wall -march=i686 -mms-bitfields -mthreads -static " \
export CPPFLAGS=" -I/usr/local/include " \
export LDFLAGS=" -L/usr/local/lib " \
export LIBS=' -lpsapi -lws2_32 -lmswsock -lpthread -lffi -lole32 -lwinmm -lshlwapi -lintl -liconv -lgdiplus -luuid -lharfbuzz -lharfbuzz-icu -lexpat -lgdi32 -lmsimg32 -lz ' # -lsupc++ ./configure --prefix=/usr/local \
--enable-static \
--disable-shared \
--disable-gtk-doc \
--enable-win32 \
--enable-win32-font cairo (version 1.14.6 [release]) will be compiled with: The following surface backends:
Image: yes (always builtin)
Recording: yes (always builtin)
Observer: yes (always builtin)
Mime: yes (always builtin)
Tee: no (disabled, use --enable-tee to enable)
XML: no (disabled, use --enable-xml to enable)
Skia: no (disabled, use --enable-skia to enable)
Xlib: no (requires X development libraries)
Xlib Xrender: no (requires --enable-xlib)
Qt: no (disabled, use --enable-qt to enable)
Quartz: no (requires CoreGraphics framework)
Quartz-image: no (disabled, use --enable-quartz-image to enable)
XCB: no (requires xcb >= 1.6 xcb-render >= 1.6 http://xcb.freedesktop.org)
Win32: yes
OS2: no (disabled, use --enable-os2 to enable)
CairoScript: yes
PostScript: yes
PDF: yes
SVG: yes
OpenGL: no (disabled, use --enable-gl to enable)
OpenGL ES 2.0: no (disabled, use --enable-glesv2 to enable)
BeOS: no (disabled, use --enable-beos to enable)
DirectFB: no (disabled, use --enable-directfb to enable)
OpenVG: no (disabled, use --enable-vg to enable)
DRM: no (disabled, use --enable-drm to enable)
Cogl: no (disabled, use --enable-cogl to enable) The following font backends:
User: yes (always builtin)
FreeType: yes
Fontconfig: yes
Win32: yes
Quartz: no (requires CoreGraphics framework) The following functions:
PNG functions: yes
GLX functions: no (not required by any backend)
WGL functions: no (not required by any backend)
EGL functions: no (not required by any backend)
X11-xcb functions: no (disabled, use --enable-xlib-xcb to enable)
XCB-shm functions: no (requires --enable-xcb) The following features and utilities:
cairo-trace: no (requires dynamic linker and zlib and real pthreads)
cairo-script-interpreter: yes And the following internal features:
pthread: yes
gtk-doc: no
gcov support: no
symbol-lookup: no (requires bfd)
test surfaces: no (disabled, use --enable-test-surfaces to enable)
ps testing: no (requires libspectre)
pdf testing: no (requires poppler-glib >= 0.17.4)
svg testing: no (requires librsvg-2.0 >= 2.35.0)
win32 printing testing: no (requires ghostscript) ----------------------------------------------------------------------------------
src/win32/cairo-win32-system.c
----------------------------------------------------------------------------------
/*
BOOL WINAPI
DllMain (HINSTANCE hinstDLL,
DWORD fdwReason,
LPVOID lpvReserved); BOOL WINAPI
DllMain (HINSTANCE hinstDLL,
DWORD fdwReason,
LPVOID lpvReserved)
{
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
CAIRO_MUTEX_INITIALIZE ();
break; case DLL_PROCESS_DETACH:
CAIRO_MUTEX_FINALIZE ();
break;
} return TRUE;
} */
----------------------------------------------------------------------------------
__declspec(dllexport) fix to --> __attribute__((visibility ("default")))
define xxx __declspec(dllimport) fix to --> define xxx extern
__attribute__((visibility ("hidden"))) fix to --> __attribute__((visibility ("default")))
delete all DllMain function src\cairoint.h(54):#define cairo_public __declspec(dllexport)
#define cairo_public __declspec(dllexport) -> __attribute__((visibility ("default"))) src\cairo.h(55):# define cairo_public __declspec(dllimport)
#define cairo_public __declspec(dllimport) -> extern src\cairo-compiler-private.h(120):#define cairo_private_no_warn __attribute__((__visibility__("hidden")))
#define cairo_private_no_warn __attribute__((__visibility__("hidden"))) -> ("default") util\cairo-script\cairo-script-private.h(165):#define csi_private_no_warn __attribute__((__visibility__("hidden")))
#define csi_private_no_warn __attribute__((__visibility__("hidden"))) -> ("default") ----------------------------------------------------------------------------------
src/cairo.h
----------------------------------------------------------------------------------
cairo_public void cairo_mutex_init();
cairo_public void cairo_mutex_finalize();
---------------------------------------------------------------------------------- ----------------------------------------------------------------------------------
src/cairo.c
----------------------------------------------------------------------------------
void cairo_mutex_init()
{
CAIRO_MUTEX_INITIALIZE ();
} void cairo_mutex_finalize()
{
CAIRO_MUTEX_FINALIZE ();
}
----------------------------------------------------------------------------------
链接:http://pan.baidu.com/s/1hrXKrBY 密码:fxh0

_cairo-1.14.6-staticLib.7z

cairo-1.14.6 static compiler msys mingw32的更多相关文章

  1. GNU Wget 1.19.1 static built on mingw32

    http://pan.baidu.com/s/1sluFAVj #wget --version GNU Wget 1.19.1 built on mingw32. -cares +digest -gp ...

  2. gtk+-3.21.4 static build step in windows XP

    In recent days the weather is very hot Unable to sleep properly Under the state of daze research gtk ...

  3. 开源项目:windows下使用MinGW+msys编译ffmpeg

    本文参考了网络上的不少文章,但由于版本环境的问题参考文章并不能直接指导编译,本文吸收多方经验,并在自己多次编译实验的基础上写成,欢迎转载,请注名出处.    FFmpeg是在Linux平台下开发的,但 ...

  4. windows 下使用 MinGW + msys 编译 ffmpeg

    本文参考了网络上的不少文章,但由于版本环境的问题参考文章并不能直接指导编译,本文吸收多方经验,并在自己多次编译实验的基础上写成,欢迎转载,请注名出处.    FFmpeg是在Linux平台下开发的,但 ...

  5. Thrift compiler代码生成类解析

    代码生成类解析: Thrift--facebook RPC框架,介绍就不说了,百度,google一大把,使用也不介绍,直接上结构和分析吧. Hello.thrift文件内容如下: namespace ...

  6. [C#6] 1-using static

    0. 目录 C#6 新增特性目录 1. 老版本的代码 1 using System; 2 3 namespace csharp6 4 { 5 internal class Program 6 { 7 ...

  7. static详解

    static关键字用来修饰属性.方法,称这些属性.方法为静态属性.静态方法. static关键字声明一个属性或方法是和类相关的,而不是和类的某个特定的实例相关,因此,这类属性或方法也称为“类属性”或“ ...

  8. PHP面向对象之旅:static变量与方法

    static关键字声明一个属性或方法是和类相关的,而不是和类的某个特定的实例相关,因此,这类属性或方法也称为“类属性”或“类方法”. 如果访问控制权限允许,可不必创建该类对象而直接使用类名加两个冒号“ ...

  9. 解决libc.so.6: version `GLIBC_2.14' not found问题, 升级glibc,glibc-2.15

    0.以下在系统CentOS 6.3 x86_64上操作 1.试图运行程序,提示"libc.so.6: version `GLIBC_2.14' not found",原因是系统的g ...

随机推荐

  1. Kafka入门经典教程

      本帖最后由 desehawk 于 2015-5-3 00:45 编辑问题导读 1.Kafka独特设计在什么地方?2.Kafka如何搭建及创建topic.发送消息.消费消息?3.如何书写Kafka程 ...

  2. django学习<一>:安装

    这两天打算摸索下和python相关的东西,然后正好小伙伴有个关于网站的任务,就怀着好奇的心态了解了下,然后就很自然地开始涉及django的问题. 首先就是django安装的问题,想不到第一步就出问题了 ...

  3. Apache中,同一IP使用多域名对应多个网站的方法

    首先dns中确定有相应的A记录, abc  IN A   211.154.2.5 mail IN A   211.154.2.5 这个讲的是在windows下面配置apache虚拟主机: 一.配置虚拟 ...

  4. Backbone☞View中的events...click事件失效

    <div id="container"> <input type="button" id="test_click" val ...

  5. JS替换函数

    var id= id.replace(/\,/g, "','"); 记一下,

  6. 安装cocopods

    http://www.tuicool.com/articles/7VvuAr3 OS 最新版 CocoaPods 的安装流程 1.移除现有Ruby默认源 $gem sources --remove h ...

  7. 动态调用web服务

    通常我们在程序中需要调用WebService时,都是通过“添加Web引用”,让VS.NET环境来为我们生成服务代理,然后调用对应的Web服务.这样是使工作简单了,但是却和提供Web服务的URL.方法名 ...

  8. 使用ajax获取JSON数据的jQuery代码的格式

    具体的也可以参考:http://www.w3cfuns.com/notes/16039/2b004b1bcdf79092f2e66b2bbe9f51df.html

  9. Apple Watch已向微信开放WatchKit接口?

    Apple Watch在北京时间凌晨1点的苹果发布会上首次对外公布了,一时间applewatch占据了各大媒体.早上也早早地看了相关新闻,其中福布斯中文网的一则消息分外引起@隔壁W叔叔的注意,“苹果同 ...

  10. Lvs原理

    官方文档: http://www.linuxvirtualserver.org/zh/lvs1.html http://www.linuxvirtualserver.org/zh/lvs2.html ...