tags:

views:

126

answers:

1

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

A: 

hi,

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

pulp
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/->finishadd new item->main.cpp->paste the example code, build it.if this do not work something is wrong with the Platform SDK path settings.
pulp