468,119 Members | 1,804 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,119 developers. It's quick & easy.

About error MIDL2337 : unsatisfied forward declaration

ɫ
in my idl file, i define a user-define data type as bollow:
typedef struct RasterFileHeader
{
DWORD dwVersion;
LONG nDataOffset;
LONG nBandCount;
LONG nWidth;
LONG nHeight;
enum PixelDataTypeEnum ePDType; // it's a enum type import from another
tlb by importlib(...)
enum ImageModeEnum eImageMode; // it's a enum type import from another
tlb by importlib(...)
LONG nTileWidth;
LONG nTileHeight;
double dResolutionX;
double dResolutionY;
double dOrgX;
double dOrgY;
double dDPIX;
double dDPIY;
double dInvalidValue;
LONG nReserve1;
LONG nReserve2;
LONG nReserve3;
} RasterFileHeader;

when complied, it comes to the error:"error MIDL2337 : unsatisfied forward
declaration".

i has found out that

Dec 6 '06 #1
3 7177
ɫ
i has found out that
when i comment the above two enum data type
// enum PixelDataTypeEnum ePDType;
// enum ImageModeEnum eImageMode;

then compile it again, it works without errors.

Is there anybody tell me why?

thanks!
colorfilter
Dec 6 '06 #2
On Wed, 6 Dec 2006 17:27:58 +0800, I waved a wand and this message
magically appears in front of __ɫ__:
when i comment the above two enum data type
// enum PixelDataTypeEnum ePDType;
// enum ImageModeEnum eImageMode;
You need to give the values for the enumeration, i.e., enum
PixelDataTypeEnum { 8bit, 16bit, 24bit }, or include the definitions
for ePDType and eImageMode from elsewhere.

--
http://www.munted.org.uk

You've been eating the cat food again, haven't you?
Dec 6 '06 #3
ɫ wrote:
in my idl file, i define a user-define data type as bollow:
typedef struct RasterFileHeader
{
DWORD dwVersion;
LONG nDataOffset;
LONG nBandCount;
LONG nWidth;
LONG nHeight;
enum PixelDataTypeEnum ePDType; // it's a enum type import from another
tlb by importlib(...)
enum ImageModeEnum eImageMode; // it's a enum type import from another
tlb by importlib(...)
LONG nTileWidth;
LONG nTileHeight;
double dResolutionX;
double dResolutionY;
double dOrgX;
double dOrgY;
double dDPIX;
double dDPIY;
double dInvalidValue;
LONG nReserve1;
LONG nReserve2;
LONG nReserve3;
} RasterFileHeader;

when complied, it comes to the error:"error MIDL2337 : unsatisfied forward
declaration".

i has found out that
Judging the error name it seems that the above is MIDL code not C++, or
you are compiling with a wrong compiler. But, that is just my guess so I
can be wrong.

Ben
Dec 6 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Steven T. Hatton | last post: by
4 posts views Thread by lp-boy | last post: by
3 posts views Thread by yancheng.cheok | last post: by
1 post views Thread by Divakar | last post: by
75 posts views Thread by Steven T. Hatton | last post: by
7 posts views Thread by RedLars | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.