用vs2013建立了一个c++的项目,然后在根目录放置了freetype.lib,将GitHub上面的include文件夹拷贝到本机,并且在VS中设置了额外包含目录指向这个inluce文件夹,然后将freetype.dll拷贝到Debug目录下,然后程序中用了如下的代码:

#include
"stdafx.h"

#include
"FreeTypeHelper.h"

#include
<ft2build.h>

#include
"freetype/freetype.h"

#include
FT_FREETYPE_H

 

#pragma
comment(lib, "freetype")

 

 

 

int
FreeTypeHelper::Test1()

{

    FT_Library library;

    FT_Init_FreeType(&library); //加上这句后报错

 

    return 0;

}

 

编译的时候,如果加上上面的一句总是报错:

error LNK2019: unresolved external symbol __imp__FT_Init_FreeType referenced in function "public: int __thiscall FreeTypeHelper::Test1(void)" (?Test1@FreeTypeHelper@@QAEHXZ)

 

在FT_Init_FreeType上面Go To Definition, 发现定位到了freetype.h里面,用dumbbin /exports freetype.dll查看,发现DLL中也有这个方法。

到底是怎么回事那?

【解决方法】

位的lib文件,重新下载32位的lib文件方法项目根目录,就编译通过了!

FreeType的项目总是报error LNK2019: unresolved external symbol __imp错误的更多相关文章

  1. error LNK2019:unresolved external symbol

    error LNK2019:unresolved external symbol 这个错误是指程序不认识函数.具体的说就是.h文件中定义并没有实现,这就是库出现了问题. 遇到这个问题,第一步就要看是哪 ...

  2. 链接报error LNK2019: unresolved external symbol错误,解决

    http://blog.163.com/aiding_001/blog/static/22908192011102224344450/ 某次编写一个COM组件,接口定义好之后,增加了ZRX代码后编译链 ...

  3. VS2015 MSVCRTD.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4

    今天在VS2015中用编译好的QT5静态库打包软件,配置好QT的静态环境后, 发现报MSVCRTD.lib(_chandler4gs_.obj) : error LNK2019: unresolved ...

  4. error LNK2019 : unresolved external symbol Zbar配置问题

    原文链接:https://blog.csdn.net/MengchiCMC/article/details/77871714 出现error LNK2019 : unresolved external ...

  5. C++ win32 dll 引用外部CLR,加载托管程序集异常-Error 10 error LNK2019: unresolved external symbol _CLRCreateInstancet

    异常: Error 10 error LNK2019: unresolved external symbol _CLRCreateInstance@12 referenced in function ...

  6. c++模板使用出错情况error LNK2019: unresolved external symbol "public: float __thiscall Compare<float>::min(void)" (?min@?$Compare@M@@QAEMXZ) referenced in function _main

    将类模板在头文件中定义,类的成员函数在头文件中声明,头文件中只留下接口,函数的实现在另一个.cpp文件中,这样编译出来错误error LNK2019: unresolved external symb ...

  7. Error LNK2019: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(wchar_t *)"

    Error 2 error LNK2019: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToStr ...

  8. C++ Error: error LNK2019: unresolved external symbol

    在某工程中新添加了文件x.cu与x.hpp,实现了一些功能,最后编译整个工程的时候就出现了这个问题: error LNK2019: unresolved external symbol 这是链接错误, ...

  9. Error LNK2019:Unresolved External Symbol 的解决方案

    当头文件中声明了一个函数,但是在相应的源文件中却没有对该函数进行定义,则会出现为“解决的外部符号”(unresolved external symbol )错误.另外,当一个函数调用了外部的一个库文件 ...

随机推荐

  1. c#调用刀片小票打印机

    public static bool Print(int orderId, string orderTime) { bool b = true; string cut = ((char)29).ToS ...

  2. C#访问远程主机资源的方法,多种方式

    最近要实现访问远程主机的共享目录中的一个文件.遇到了权限问题.google了一下,找到了几种解决方法,记录如下: 一.调用Net use命令 // 使用方法:        //if (Connect ...

  3. C# 地磅串口编程

    C# 地磅串口编程 http://www.cnblogs.com/cancer_xu/archive/2012/09/14/WeighBridge-Com.html http://www.cnblog ...

  4. Delphi的自动编译软件Want

    Delphi自动编译环境的搭建及使用 什么是Want Want是一套Windows下用于编译Delphi源代码的工具.Want的名称是Windows Ant的意思. Ant是Java下最著名的自动编译 ...

  5. UICollectionView 相关

    当数据不多,collectionView.contentSize小于collectionView.frame.size的时候,UICollectionView是不会滚动的 self.Cov.alway ...

  6. 架构:Screaming Architecture(转载)

    Imagine that you are looking at the blueprints of a building. This document, prepared by an architec ...

  7. Java并发编程的艺术(八)——闭锁、同步屏障、信号量详解

    1. 闭锁:CountDownLatch 1.1 使用场景 若有多条线程,其中一条线程需要等到其他所有线程准备完所需的资源后才能运行,这样的情况可以使用闭锁. 1.2 代码实现 // 初始化闭锁,并设 ...

  8. 趣谈Java变量的可见性问题

    了解过多线程的我们,对synchorized,sleep和valatile都比较了解,但是当这三个名词和“Java变量得可见性”的话题联系在一起不知道大家是否还可以保持大脑清晰??? 最近看到一个关于 ...

  9. ExtJS 4.2 教程-06:服务器代理(proxy)

    转载自起飞网,原文地址:http://www.qeefee.com/extjs-course-6-server-proxy ExtJS 4.2 教程-01:Hello ExtJS ExtJS 4.2 ...

  10. COUNT DISTINCT ROW_NUMBER DENSE_RANK 以及对COUNT去重(非PARTITION)

    1:COUNT DISTINCT         SELECT          COUNT(DISTINCT [QS_QuestionStem].Id)  AS ReqCount1,         ...