Problem with GDI+ and C++

Started by
2 comments, last by Eyrian 20 years ago
Hello, I have been trying to get GD+ plus working with staight C++ Under MSVS.NET, but I haven''t had any luck. I keep getting unresolved external errors. I tried everything I can think of: checking my path, reinstalling the SDK, using code straight from MS''s examples, but without any luck. Does anyone know what might be wrong? Is there a simple, complete GDI+ project I could download somewhere to try and dissect what might be wrong? Thanks, Eyrian
Advertisement
You have to link to gdiplus.lib
More details of the linker errors would be really helpful but my guess is that you''re not linking against the correct library:-

If this is VC6/7 add "gdiplus.lib" to the projects linker inputs or use the pragma:-

#pragma comment(lib, "gdiplus.lib")

then include "gdiplus.h" in your source file.

These files come with the Platform SDK, and if you don''t have them, it won''t work.

Jans.
Jansic,

Thanks a lot! I had thought I wasn''t linking to the correct library, so I had set the path, but I guess it didn''t work. It did, however, after I used the pragma you suggested.

Ciao,
Eyrian

This topic is closed to new replies.

Advertisement