한 프로젝트에서 잠시 동안 비슷한 문제로 싸웠습니다.
#define GDIPVER 0x0110 // Use more advanced GDI+ features
을하지만, 미리 컴파일 된 헤더는 "gdiplus.h을"#include를하지 않습니다 나를 위해, 내 미리 컴파일 된 헤더이 있습니다. 실제로 GDI + 호출을 수행하는 .cpp 파일에서만 발생합니다. GDI + 클래스는 GDI + 개체 포인터가있는 멤버로 선언합니다. 한스 (Hans)와 다른 의견에서 언급했듯이, GDIPVER가 설정되기 전에 gdiplus.h를 포함한 다른 헤더가있을 수 있습니다. 포함 된 위치를 찾으려면 프로젝트의 C/C++> 명령 줄 설정으로 가서/showIncludes를 추가 한 다음 전체 빌드를 수행하고 빌드 로그에서 gdiplus.h를보고 다시 포함하여 첫 번째 헤더까지 추적하십시오.
장애물을 제거하면 매니페스트가 업데이트되지 않는 한 내 응용 프로그램이 실제로 1.1 기능을 사용하지 않는다는 것을 발견했습니다. 따라서 내 .cpp 파일 중 하나는 다음과 같습니다.
// Update Manifest
// cf: http://blogs.msdn.com/b/oldnewthing/archive/2007/05/31/2995284.aspx
//
// We use features from GDI+ v1.1 which is new as of Windows Vista. There is no redistributable for Windows XP.
// This adds information to the .exe manifest to force GDI+ 1.1 version of gdiplus.dll to be loaded on Vista
// without this, Vista defaults to loading version 1.0 and our application will fail to launch with missing entry points.
#if 64BIT_BUILD
#pragma comment(linker, "\"/manifestdependency:type='Win32' name='Microsoft.Windows.GdiPlus' version='1.1.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker, "\"/manifestdependency:type='Win32' name='Microsoft.Windows.GdiPlus' version='1.1.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
경고가 잘못되었습니다. * 일부 코드는 gdiplus.h를 # 포함하기 전에 수행합니다. 가장 좋은 장소는 stdafx.h 파일입니다./showIncludes로 문제를 해결하십시오 –
예, 이것은 내 stdafx.h에 있습니다. – Craftsmann
아마도 이전에 뭔가도 포함되어 있습니다. – doctorlove