繁体   English   中英

为什么 freetype 不加载这些函数?

[英]Why isn't freetype loading these functions?

我有自由类型作为 dll。 所有 header 文件都在 Visual Studio 上自动完成,以下语句编译良好: FT_Library ft; FT_Face face; FT_Library ft; FT_Face face; . 但是,它找不到FT_Init_FreetypeFT_New_Face ( LNK2019 unresolved external symbol... )。 这是我的完整代码:

#include <ft2build.h>
#include FT_FREETYPE_H
#include <freetype/freetype.h>
#include <freetype/ftcache.h>
#include <freetype/ftbitmap.h>
// Just getting desperate including headers here

void initFreetype() {
    FT_Library ft;

    FT_Face face;
    
    if (FT_Init_FreeType(&ft)) {
        fprintf(stderr, "Could not init freetype library\n");
        return;
    }
    if (FT_New_Face(ft, "C:\\Font\\verdana.ttf", 0, &face)) {
        fprintf(stderr, "Could not open font\n");
        return;
    }
}```

我很愚蠢,在 linker 中指向 freetype\objs 而不是 freetype\objs\Win32\Debug。

我仍然收到其他错误(来自 freetype.lib(bdf.obj) 的unresolved external symbol _sprintf... ,所以我认为其他错误也可能是错误的。

编辑:最后一个错误已在此处修复:https://community.cypress.com/thread/14289?start=0&tstart=0通过链接 legacy_stdio_definitions.lib

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM