簡體   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