关于windows系统中静态库链接找不到的问题

典型错误提示如下

error LNK2019: 无法解析的外部符号 _GdiplusStartup@12,该符号在函数 "public: __thiscall APPInit::APPInit(void)" (??0APPInit@@QAE@XZ) 中被引用
error LNK2019: 无法解析的外部符号 _GdiplusShutdown@4,该符号在函数 "public: __thiscall APPInit::~APPInit(void)" (??1APPInit@@QAE@XZ) 中被引用

解决方案如下

  • 源文件包含#pragma comment(lib,"gdiplus.lib");

  • 以vs2013为例,设置静态库查找路径

 $(WindowsSDK_LibraryPath_x86);

 

按这种方式设置,可以知道VS到系统目录去查找随系统安装的库。 

猜你喜欢

转载自blog.csdn.net/moyebaobei1/article/details/87010285
今日推荐