有关 GDI+ 的问题

impossible100 2005-09-25 10:51:13
我在 VC 中想使用 GDI+ 提供的函数打开图片,代码如下:

#define UNICODE
#include <gdiplus.h>
using namespace Gdiplus;

Image* image = Image::FromFile(L"1.jpg");

但却提示有6个无法解析的内部错误,如下:

ImageTransform error LNK2019: 无法解析的外部符号 _GdipAlloc@4 ,该符号在函数 "public: static void * __cdecl Gdiplus::GdiplusBase::operator new(unsigned int)" (??2GdiplusBase@Gdiplus@@SAPAXI@Z) 中被引用

ImageTransform error LNK2019: 无法解析的外部符号 _GdipCloneImage@8 ,该符号在函数 "public: virtual class Gdiplus::Image * __thiscall Gdiplus::Image::Clone(void)" (?Clone@Image@Gdiplus@@UAEPAV12@XZ) 中被引用

ImageTransform error LNK2019: 无法解析的外部符号 _GdipDisposeImage@4 ,该符号在函数 "public: virtual __thiscall Gdiplus::Image::~Image(void)" (??1Image@Gdiplus@@UAE@XZ) 中被引用

ImageTransform error LNK2019: 无法解析的外部符号 _GdipFree@4 ,该符号在函数 "public: static void __cdecl Gdiplus::GdiplusBase::operator delete(void *)" (??3GdiplusBase@Gdiplus@@SAXPAX@Z) 中被引用

ImageTransform error LNK2019: 无法解析的外部符号 _GdipLoadImageFromFile@8 ,该符号在函数 "public: __thiscall Gdiplus::Image::Image(wchar_t const *,int)" (??0Image@Gdiplus@@QAE@PB_WH@Z) 中被引用

ImageTransform error LNK2019: 无法解析的外部符号 _GdipLoadImageFromFileICM@8 ,该符号在函数 "public: __thiscall Gdiplus::Image::Image(wchar_t const *,int)" (??0Image@Gdiplus@@QAE@PB_WH@Z) 中被引用

怎么能解决这个问题呢?

麻烦您指点。
...全文
81 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
CGChina 2005-09-26
  • 打赏
  • 举报
回复
没有加入gdiplus.lib
summer54 2005-09-26
  • 打赏
  • 举报
回复
明显缺少库

4,445

社区成员

发帖
与我相关
我的任务
社区描述
图形图像/机器视觉
社区管理员
  • 机器视觉
  • 迪菲赫尔曼
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧