因需要给python使用freetype库,so需要一个freetype的dll

2 steps

1. 在VC中设置输出为动态链接库

2. 修改ftoption.h

在284行增加2行代码即可

  /*************************************************************************/
/* */
/* DLL export compilation */
/* */
/* When compiling FreeType as a DLL, some systems/compilers need a */
/* special keyword in front OR after the return type of function */
/* declarations. */
/* */
/* Two macros are used within the FreeType source code to define */
/* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
/* */
/* FT_EXPORT( return_type ) */
/* */
/* is used in a function declaration, as in */
/* */
/* FT_EXPORT( FT_Error ) */
/* FT_Init_FreeType( FT_Library* alibrary ); */
/* */
/* */
/* FT_EXPORT_DEF( return_type ) */
/* */
/* is used in a function definition, as in */
/* */
/* FT_EXPORT_DEF( FT_Error ) */
/* FT_Init_FreeType( FT_Library* alibrary ) */
/* { */
/* ... some code ... */
/* return FT_Err_Ok; */
/* } */
/* */
/* You can provide your own implementation of FT_EXPORT and */
/* FT_EXPORT_DEF here if you want. If you leave them undefined, they */
/* will be later automatically defined as `extern return_type' to */
/* allow normal compilation. */
/* */
/* Do not #undef these macros here since the build system might define */
/* them for certain configurations only. */
/* */
/* #define FT_EXPORT(x) extern x */
/* #define FT_EXPORT_DEF(x) x */
#define FT_EXPORT(x) __declspec(dllexport) x
#define FT_BASE(x) __declspec(dllexport) x

另外,生成的dll直接放入phthon.exe所在目录即可,无需放入system32下。

编译freetype 的dll的更多相关文章

  1. XE2编译出来的DLL的DLLMain的退出地方用到了halt0

    DelphiXE2内存加模块升级版.支持32位和64位模块. 已转至新的博客 http://www.raysoftware.cn/?p=51 很多年以前写过内存加载DLL的一片技术. http://b ...

  2. 几种工具反编译被编译好的DLL文件

    我们平时在工作中经常会遇到一些已经被编译后的DLL,而且更加麻烦是没有源代码可以进行修改,只能针对这个DLL的文件进行修改才能得到我们想要的结果:本文将通过一个实例来演示如果完成一个简单的修改;我们将 ...

  3. 反编译C#的dll文件并修改,再重新生成dll

    1.把dll文件导入到ildasm工具中,ildasm是由微软提供的.net程序反编译工具,位于“C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A ...

  4. .Net,Dll扫盲篇,如何在VS中调试已经编译好的dll?

    什么是Dll? DLL 是一个包含可由多个程序同时使用的代码和数据的库. 例如,在 Windows 操作系统中,Comdlg32 DLL 执行与对话框有关的常见函数.因此,每个程序都可以使用该Dll中 ...

  5. 利用openssl管理证书及SSL编程第3部分:将MinGW编译的openssl dll导出def和lib供MSVC使用

    将MinGW编译的openssl dll导出def和lib供MSVC使用 前面我们用mingw把openssl 编译成了动态库,得到下面2个dll文件: libeay32.dll ssleay32.d ...

  6. DevExpress 编译成功的 dll

    DevExpress 编译成功的 dll 附注册方法 其它的有些文件没有,如: DevExpress.EasyTest 这个程序集找不到 希望有的朋友可以分享一下, 安装程序集 通常,将程序集安装到G ...

  7. 使用code::blocks编译windows的dll链接库

    因为机子上没有安装Visual Studio,所以找到了一种通过code::blocks编译dll的方式,踩到的坑是code::blocks默认的compiler是32位的,这样编译出的dll也是32 ...

  8. c#:Reflector+Reflexil 修改编译后的dll/exe文件

    不知道大家有没有这样的经历:现场实施时测试出一个bug,明明知道某个dll/exe文件只要修改一二行代码即可,但手头没有开发环境,紧急情况下,可以用reflector + reflexil 临时直接修 ...

  9. 在vs2012下编译出现Msvcp120d.dll 丢失的问题

    之前在vs2012下编译一个opencv程序时,一直出现msvcp120d.dll文件丢失的提示信息,最初会在网上找dll下载,将其拖入系统文件夹再进行regsvr32命令操作,结果都没有解决错误,甚 ...

随机推荐

  1. Altium Designer如何移动选中的所有对象

    用shift去选中, 快捷键M S移动整体

  2. HDU 1996汉诺塔VI

    题目: n个盘子的汉诺塔问题的最少移动次数是2^n-1,即在移动过程中会产生2^n个系列.由于 发生错移产生的系列就增加了,这种错误是放错了柱子,并不会把大盘放到小盘上,即各柱 子从下往上的大小仍保持 ...

  3. 【习题 3-1 UVA - 1585】Score

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 模拟水题 [错的次数] 在这里输入错的次数 [反思] 在这里输入反思 [代码] #include <bits/stdc++.h ...

  4. [Angular HTML] Implementing The Input Mask Cursor Navigation Functionality -- setSelectionRange

    @HostListener('keydown', ['$event', '$event.keyCode']) onKeyDown($event: KeyboardEvent, keyCode) { i ...

  5. [RxJS] RefCount: automatically starting and stopping an execution

    With the connect() method on a ConnectableObservable, the programmer is responsible for avoiding lea ...

  6. MVC5管道处理模型

    原文:MVC5管道处理模型 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/m0_37591671/article/details/82970442 ...

  7. DOS命令具体解释

    net use $">\\ip\ipc$Content$nbsp;" " /user:" " 建立IPC空链接   net use $" ...

  8. item.imageInsets =

    直接上代码: item.imageInsets = UIEdgeInsetsMake(6, 0, -6, 0);//设置图片居中 阅读全文 本文已收录于下面专栏: wanglixin1999 +关注 ...

  9. css3-9 css中的浮动怎么使用

    css3-9 css中的浮动怎么使用 一.总结 一句话总结:用来做一般的行效果,比如说手机左右分布的头部导航栏.浮动的东西放到一个div中去,里面的内容根据需求左浮动或者右浮动,然后记得加上清除浮动. ...

  10. http500:服务器内部错误案例详解(服务器代码语法错误或者逻辑错误)

    http500:服务器内部错误案例详解(服务器代码语法错误或者逻辑错误) 一.总结 服务器内部错误可能是服务器中代码运行的时候的语法错误或者逻辑错误 二.http500:服务器内部错误案例详解 只是一 ...