Re: Errors in VC program with gdiplus



See below:
On Tue, 21 Jul 2009 18:42:39 -0700 (PDT), Aegis Delacour <eloquent1@xxxxxxxxx> wrote:

hey i get the following errors

--------------------Configuration: LowerEicas - Win32
Debug--------------------
Compiling...
LowerEicasDlg.cpp
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(32) : error C2065: 'ULONG_PTR' : undeclared identifier
****
#if _MSC_VER < 1300
typedef unsigned long ULONG_PTR
#endif

This type is not defined in the old SDK that comes with VS6. The rest of the errors might
well be the result of this missing type. You are using a post-VS6 header file in a VS6
build.

Note that for versions < 1300, you don't need to worry about the 64-bit definition of
ULONG_PTR because there is no 64-bit compiler for VS6.

Note, however, that the other errors (since you didn't bother to tell us what is on those
liens) might be due to other incompatibilities of a post-VS6 header file with a VS6
compiler.
****
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(32) : error C2065: 'token' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(32) : error C2165: 'left-side modifier' : cannot modify pointers to
data
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(32) : error C2071: 'NotificationHookProc' : illegal storage class
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(33) : error C2146: syntax error : missing ')' before identifier
'token'
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(33) : error C2165: 'left-side modifier' : cannot modify pointers to
data
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(33) : error C2071: 'NotificationUnhookProc' : illegal storage class
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(33) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(86) : error C2059: syntax error : 'const'
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(95) : error C2146: syntax error : missing ')' before identifier
'token'
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(95) : warning C4229: anachronism used : modifiers on data are ignored
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(95) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
c:\program files\microsoft visual studio\vc98\include\gdiplusinit.h
(95) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(267) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(270) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(273) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(277) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(281) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(285) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(289) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(293) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(296) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(299) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(302) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(305) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(308) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\gdiplusflat.h
(312) : error C2955: 'iterator' : use of class template requires
template argument list
c:\program files\microsoft visual studio\vc98\include\utility
(71) : see declaration of 'iterator'
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35732) : error C2501: 'WindowToJpeg' :
missing storage-class or type specifiers
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35732) : error C2078: too many initializers
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35732) : error C2440: 'initializing' : cannot
convert from 'unsigned short [9]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or
function-style cast
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35746) : error C2146: syntax error : missing
';' before identifier 'gdiplusToken'
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35746) : error C2065: 'gdiplusToken' :
undeclared identifier
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35748) : error C2065: 'GdiplusStartup' :
undeclared identifier
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35750) : error C2660: 'GetWindowDC' :
function does not take 1 parameters
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35754) : error C2660: 'GetWindowRect' :
function does not take 2 parameters
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35768) : error C2660: 'new' : function does
not take 3 parameters
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35772) : error C2065: 'GetEncoderClsid' :
undeclared identifier
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35798) : error C2660: 'ReleaseDC' : function
does not take 2 parameters
C:\Documents and Settings\user\Desktop\22july\Lower EICAS (5.0) -
250609\LowerEicasDlg.cpp(35803) : fatal error C1004: unexpected end of
file found
Error executing cl.exe.

LowerEicas.exe - 38 error(s), 1 warning(s)

and im wondering why i have already put

#include <gdiplus.h>
#include <math.h>
#include <stdio.h>

using namespace Gdiplus;

at the top part of the cpp

what am i doing wrong?
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Errors in VC program with gdiplus
    ... template argument list ... : see declaration of 'iterator' ...
    (microsoft.public.vc.mfc)
  • Re: Maintance of c++ code
    ... iterator constant in the standard, ... template ... template <class Iter_> ... container, some only work with particular containers. ...
    (comp.object)
  • Re: Einfache Frage zu STD::SORT
    ... > void sort(RanIt first, RanIt last, Pred pr); ... > The first template function reorders the sequence designated by ... >> auch was anderes, je nachdem halt, wie der jeweilige Iterator ... Eben, ein Objekt. ...
    (microsoft.public.de.vc)
  • Friend function of a template class
    ... template class. ... MyFriendFunction (MyClass * const ptrMyClass) ... after class declaration. ...
    (comp.lang.cpp)
  • Re: Type intializing with template
    ... There's a syntax error lurking in your code. ... Template definitions and declarations cause mysterious syntax errors. ... the simple error of lacking the template declaration ... > ref class X{ ...
    (microsoft.public.dotnet.languages.vc)

Loading