473,587 Members | 2,580 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

About error MIDL2337 : unsatisfied forward declaration

in my idl file, i define a user-define data type as bollow:
typedef struct RasterFileHeade r
{
DWORD dwVersion;
LONG nDataOffset;
LONG nBandCount;
LONG nWidth;
LONG nHeight;
enum PixelDataTypeEn um 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;
} RasterFileHeade r;

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

i has found out that

Dec 6 '06 #1
3 7712
i has found out that
when i comment the above two enum data type
// enum PixelDataTypeEn um 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 PixelDataTypeEn um ePDType;
// enum ImageModeEnum eImageMode;
You need to give the values for the enumeration, i.e., enum
PixelDataTypeEn um { 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 RasterFileHeade r
{
DWORD dwVersion;
LONG nDataOffset;
LONG nBandCount;
LONG nWidth;
LONG nHeight;
enum PixelDataTypeEn um 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;
} RasterFileHeade r;

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
8440
by: Yoon-Soo Lee | last post by:
I am using Visual C++ .NET 2003 and running into some linking error from the following template code. The error messages is error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class Test<int> &)"...
6
5196
by: Steven T. Hatton | last post by:
Should I be able to forward declare something from a namespace different from the current one? For example the following code compiles: //testdriver.hpp #ifndef TESTDRIVER_HPP #define TESTDRIVER_HPP #include <ostream> namespace ns_testdriver{ using std::ostream;
4
1507
by: lp-boy | last post by:
Hello! Is the following code legal? template<class T> struct holder{}; struct A { holder<struct B*> h; //!!!
3
8853
by: yancheng.cheok | last post by:
hello all, how can i make, a forward declaration class's enum member, being visible by another class? consider the following case, ---------------------------- dog.h ----------------------------
1
2181
by: Divakar | last post by:
Hi, We are getting the following error while compiling the UserExit program. Not sure where the problem is. We are using the IBM supplied UserExit sample program. We have changed some variables according to our environment. DB2 8.2 on HP-UX. Using gcc compiler. Errors are as below:
1
5403
by: toton | last post by:
Hi, I have two namespace contains class InkFrame and PrefDialog respectively. PrefDialog needs InkFrame to show the dialog over the frame. It also stores a pointer to InkFrame inside it. Now I want InkFrame to be forward declared in the PrefDialog header file rather than to be included. I want to include it in the cpp file instead. There is...
3
4098
by: DhaneshNair | last post by:
Hi all, I hav a file which is actually linkage file (used as an reference interface between c and c++ files). And this file has got two structures in it .. When i include this file directly i dont have any issues. but according to some norms in the review I am not supposed to use this file direclty in the header file .. but its fine if i...
75
5411
by: Steven T. Hatton | last post by:
No, this is not a troll, and I am not promoting Java, C-flat, D, APL, Bash, Mathematica, SML, or LISP. A college teacher recently posted to this newsgroup regarding her observation that there has been a significant decline in the number of students opting to take courses in C++. I just want to let people know what I believe are the biggest...
7
5066
by: RedLars | last post by:
Need some help with a couple of questions. Previously I have seen this declaration; struct Student { int age; char name; }; and this definition of an object; struct Student stud;
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.