1>TextureManager.obj : error LNK2019: 无法解析的外部符号 __imp__FreeImage_Unload@4,该符号在函数 "public: bool __thiscall TextureManager::LoadTexture(char const *,unsigned int,unsigned int,int,int,int)" (?LoadTexture@TextureManager@@QAE_NPBDIIHHH@Z) 中被引用1>TextureManager.obj : error LNK2019: 无法解析的外部符号 __imp__FreeImage_Load@12,该符号在函数 "public: bool __thiscall TextureManager::LoadTexture(char const *,unsigned int,unsigned int,int,int,int)" (?LoadTexture@TextureManager@@QAE_NPBDIIHHH@Z) 中被引用1>TextureManager.obj : error LNK2019: 无法解析的外部符号 __imp__FreeImage_GetFIFFromFilename@4,该符号在函数 "public: bool __thiscall TextureManager::LoadTexture(char const *,unsigned int,unsigned int,int,int,int)" (?LoadTexture@TextureManager@@QAE_NPBDIIHHH@Z) 中被引用1>TextureManager.obj : error LNK2019: 无法解析的外部符号 __imp__FreeImage_FIFSupportsReading@4,该符号在函数 "public: bool __thiscall TextureManager::LoadTexture(char const *,unsigned int,unsigned int,int,int,int)" (?LoadTexture@TextureManager@@QAE_NPBDIIHHH@Z) 中被引用1>TextureManager.obj : error LNK2019: 无法解析的外部符号 __imp__FreeImage_GetFileType@8,该符号在函数 "public: bool __thiscall TextureManager::LoadTexture(char const *,unsigned int,unsigned int,int,int,int)" (?LoadTexture@TextureManager@@QAE_NPBDIIHHH@Z) 中被引用1>TextureManager.obj : error LNK2019: 无法解析的外部符号 __imp__FreeImage_GetBits@4,该符号在函数 "public: bool __thiscall TextureManager::LoadTexture(char const *,unsigned int,unsigned int,int,int,int)" (?LoadTexture@TextureManager@@QAE_NPBDIIHHH@Z) 中被引用1>TextureManager.obj : error LNK2019: 无法解析的外部符号 __imp__FreeImage_GetWidth@4,该符号在函数 "public: bool __thiscall TextureManager::LoadTexture(char const *,unsigned int,unsigned int,int,int,int)" (?LoadTexture@TextureManager@@QAE_NPBDIIHHH@Z) 中被引用1>TextureManager.obj : error LNK2019: 无法解析的外部符号 __imp__FreeImage_GetHeight@4,该符号在函数 "public: bool __thiscall TextureManager::LoadTexture(char const *,unsigned int,unsigned int,int,int,int)" (?LoadTexture@TextureManager@@QAE_NPBDIIHHH@Z) 中被引用
C++环境
只需要在文件开头加上一句话,这样子
#include <FreeImage.h>
#pragma comment(lib,"FreeImage.lib")