我正在尝试 在 win32 控制台应用程序(VS 2012)中运行此页面http://msdn.microsoft.com/en-us/library/windows/desktop/ms534077(v=vs.85).aspx的代码并拥有这个错误:
Error 3 error LNK2019: unresolved external symbol _GdiplusStartup@12 referenced in function _main c:\Users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj ConsoleApplication4
Error 4 error LNK2019: unresolved external symbol _GdiplusShutdown@4 referenced in function _main c:\Users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj ConsoleApplication4
Error 6 error LNK2019: unresolved external symbol _GdipLoadImageFromFileICM@8 referenced in function "public: __thiscall Gdiplus::Image::Image(wchar_t const *,int)" (??0Image@Gdiplus@@QAE@PB_WH@Z) c:\Users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj ConsoleApplication4
Error 5 error LNK2019: unresolved external symbol _GdipLoadImageFromFile@8 referenced in function "public: __thiscall Gdiplus::Image::Image(wchar_t const *,int)" (??0Image@Gdiplus@@QAE@PB_WH@Z) c:\Users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj ConsoleApplication4
Error 9 error LNK2019: unresolved external symbol _GdipGetImageWidth@8 referenced in function "public: unsigned int __thiscall Gdiplus::Image::GetWidth(void)" (?GetWidth@Image@Gdiplus@@QAEIXZ) c:\Users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj ConsoleApplication4
Error 10 error LNK2019: unresolved external symbol _GdipGetImageHeight@8 referenced in function "public: unsigned int __thiscall Gdiplus::Image::GetHeight(void)" (?GetHeight@Image@Gdiplus@@QAEIXZ) c:\Users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj ConsoleApplication4
Error 2 error LNK2019: unresolved external symbol _GdipFree@4 referenced in function "public: static void __cdecl Gdiplus::GdiplusBase::operator delete(void *)" (??3GdiplusBase@Gdiplus@@SAXPAX@Z) c:\Users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj ConsoleApplication4
Error 8 error LNK2019: unresolved external symbol _GdipDisposeImage@4 referenced in function "public: virtual __thiscall Gdiplus::Image::~Image(void)" (??1Image@Gdiplus@@UAE@XZ) c:\Users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj ConsoleApplication4
Error 7 error LNK2019: unresolved external symbol _GdipCloneImage@8 referenced in function "public: virtual class Gdiplus::Image * __thiscall Gdiplus::Image::Clone(void)" (?Clone@Image@Gdiplus@@UAEPAV12@XZ) c:\Users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj ConsoleApplication4
Error 1 error LNK2019: unresolved external symbol _GdipAlloc@4 referenced in function "public: static void * __cdecl Gdiplus::GdiplusBase::operator new(unsigned int)" (??2GdiplusBase@Gdiplus@@SAPAXI@Z) c:\Users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.obj ConsoleApplication4
Error 11 error LNK1120: 10 unresolved externals c:\users\администратор\documents\visual studio 2012\Projects\ConsoleApplication4\Debug\ConsoleApplication4.exe ConsoleApplication4
在 gdiplusinit.hi 中看到 GdiplusStartupInput,GdiplusStartupOutput,DebugEventLevel 是模棱两可的。有谁知道如何解决这个问题?