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. 用HTML/JS/PHP方式实现页面延时跳转

    WEB开发中经常会遇到页面跳转或延时跳转的需求,掌握各种页面跳转方式非常必要. 以下是我总结有用HTML/JS/PHP三类方式实现跳转的方法,例子皆为三秒后跳转到index.php 页面. 1,HTM ...

  2. shell学习之路:重定向符号的使用

    http://note.youdao.com/share/?id=096963bf2a0862fd338919d781636be2&type=note 快捷键:   ​  

  3. XMAL语法系列之-(2)---WPF控件继承图

    WPF控件继承图 1 FrameworkElement 1.1 Panel(面板类元素) 1.1.1 Canvas 1.1.2 DockPanel 1.1.3 Grid 1.1.4 TabPanel ...

  4. [译]git rebase

    rebase就是重新定义你分支的起点, 分支上的commit将生成对应的新的commit并放在你指定的新的起点commit后, 分支上的老commit将被删除. rebase就是将你的分支从一个com ...

  5. HDOJ 4751 Divide Groups

    染色判断二分图+补图 比赛的时候题意居然是反的,看了半天样例都看不懂 .... Divide Groups Time Limit: 2000/1000 MS (Java/Others)    Memo ...

  6. js跳转页面

    <script type="text/javascript">  方法一: location.href = 'http://www.baidu.com'; 方法二: l ...

  7. Stm32 debug停留在"BKPT 0xAB"或者"SWI 0xAB"的解决办法。

    一..背景: 曾经在工作中接触过STM32一段时间,但没有深入的去学习,只是用前辈搭建好的模型来实现一些功能罢了,俗话说的好,大树底下好乘凉,开发确实轻松了,可是不深究点,又觉着心里不踏实,然而也一直 ...

  8. bootstrap搜索框样式代码及效果

    <div class="container"> <div class="input-group"> <input type=&qu ...

  9. 【定时任务|开机启动】Windows Server 2008/2012 计划任务配置(任务计划程序)每分钟执行BAT

    打开计划任务快捷方式(在 “管理工具”内): C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools\Tas ...

  10. debian8 配置使用 nfs

    操作过的步骤: 1.dpkg-reconfigre rpcbind. 2.在终端上退出要挂载的目录. 错误:mount -t nfs 172.16.0.121:/home/junda /mnt,出现以 ...