0

I am just trying to compile this simple example : http://msdn.microsoft.com/en-us/library/ms533895(VS.85).aspx

what needs to be done , in order to compile and run this?

  • I have installed platform sdk
  • set the correct paths for include and lib dirs
  • tried different c compilers (visual c++ , c-free , dev-C++ )

first I was getting gdiplus.h not found error. After fixing that

these are the errors:

1>E:\Program Files\Microsoft Platform SDK for Windows XP SP2\Include\specstrings.h(334) : warning C4005: '__reserved' : macro redefinition

1> e:\Program Files\Microsoft Visual Studio 8\VC\include\sal.h(702) : see previous definition of '__reserved'

1>E:\Program Files\Microsoft Platform SDK for Windows XP SP2\Include\specstrings.h(341) : warning C4005: '__checkReturn' : macro redefinition

1> e:\Program Files\Microsoft Visual Studio 8\VC\include\sal.h(703) : see previous definition of '__checkReturn'

help please

1 Answer 1

1

for visual studio: add in the Linker settings->command line "gdiplus.lib" to the 'Additional Options'

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks but where exactly are these linker settings
Ok I added gpiplus.lib, to linker settings. Now I am getting this: error LNK2019: unresolved external symbol imp__PostQuitMessage@4 referenced in function "long __stdcall WndProc(struct HWND *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
New Project->Win32 Project->Windows applicaton/emtpy project/->finish add new item->main.cpp->paste the example code, build it. if this do not work something is wrong with the Platform SDK path settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.