因需要给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下。

最新文章

  1. Codeforces Round #383 (Div. 1)
  2. FPGA基本原理之一
  3. MString 与 QString 互转
  4. php 信号量
  5. ASP.NET读取配置文件发送邮件
  6. 【转】你真的了解iOS代理设计模式吗?
  7. inet_aton等函数
  8. R包——ggplot2(二)
  9. KindEditor - 代码高亮
  10. C# 几种方法来复制的阵列
  11. 编程算法基础-数字数码管-隐藏password
  12. zkw费用流
  13. NS3网络仿真(10): 解析以太网帧
  14. Python爬虫入门教程 26-100 知乎文章图片爬取器之二
  15. 获取多<a/>标签id值的点击事件
  16. thinkphp5 上传服务器后 Access denied
  17. linux 目录/sys 解析
  18. sap 创建odata服务,通过http向数据库 进行增删改查
  19. 如何合并ts文件?
  20. 各种linux小操作

热门文章

  1. sql for xml query sample
  2. mangodb学习0.1 概念
  3. CQRS之旅——旅程6(我们系统的版本管理)
  4. Altium Designer敷铜的规则设定
  5. Html animation by css(Sequence Js Tutorial)
  6. Android学习笔记之GridView的使用具体解释
  7. gvim 窗口最大化启动
  8. C# 使用 RabbitMQ
  9. 如何编辑SDE数据库(转载)
  10. Spring MVC学习:配置简解