Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > About error MIDL2337 : unsatisfied forward declaration

Reply
Thread Tools

About error MIDL2337 : unsatisfied forward declaration

 
 
滤色镜
Guest
Posts: n/a
 
      12-06-2006
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



 
Reply With Quote
 
 
 
 
滤色镜
Guest
Posts: n/a
 
      12-06-2006

> 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


 
Reply With Quote
 
 
 
 
Alex Buell
Guest
Posts: n/a
 
      12-06-2006
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?
 
Reply With Quote
 
benben
Guest
Posts: n/a
 
      12-06-2006
滤色镜 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JNI Unsatisfied Link Error (but the method name is correct!) cppaddict Java 4 05-20-2005 11:13 AM
'Unsatisfied Link' error in java.library.path bill.blackmon@austingoodwill.org Java 1 02-06-2005 06:28 PM
Unsatisfied Link Error with JNI example allelopath Java 1 01-04-2005 11:23 PM
Re-forward declaration of types which were already forward declared qazmlp C++ 1 02-15-2004 07:00 PM
Unsatisfied Link Error - works on one machine but not the other - HELP!!! Mark Java 9 01-16-2004 06:05 PM



Advertisments