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 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
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?
ÂËÉ«¾µ 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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> &)"...
|
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;
|
by: lp-boy |
last post by:
Hello!
Is the following code legal?
template<class T>
struct holder{};
struct A
{
holder<struct B*> h; //!!!
|
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
----------------------------
|
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:
| |
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...
|
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...
|
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...
|
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;
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |