Title: [MSVC] RE: [windev] UPDATE: Enum/typedef namespace bug with #import[Scanned]

No. It currently looks like so:

#import "foo.tlb" named_guids no_implementation

#if defined(_INCLUDE_IMPLEMENTATIONS)
#import "foo.tlb" named_guids implementation_only
#endif // defined(_INCLUDE_IMPLEMENTATIONS)

These lines are in a header which is included in several source files. Only
one of these has "_INCLUDE_IMPLEMENTATIONS" defined. The first attempt was
the first line only without the 'no_implementation' option. Incidently, it
wouldn't have produced an implementation at all if I had used
'raw_interfaces_only'.

Thanks.

Ciao,
Dee

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Stephen Spencer
Sent: Wednesday, October 22, 2003 12:31 PM
To: Dee Holtsclaw; Windev; MSVC List
Subject: RE: [windev] UPDATE: Enum/typedef namespace bug with
#import[Scanned]


Dee

As a matter of interest, are you using "raw_interfaces_only" or not?

Steve Spencer
Northgate blue8
Nottingham
UK

-----Original Message-----
From: Dee Holtsclaw [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 22, 2003 5:11 PM
To: Windev; MSVC List
Subject: [windev] UPDATE: Enum/typedef namespace bug with
#import[Scanned]


I finally got the thing to compile by #importing twice using
'no_implementation' and 'implementation_only'. This sacrifices inlining of
the functions but does get it to compile. Funny thing is that the .tli
produced using 'implementation_only' has the entire file wrapped in a
'namespace X {' while the standard version does not. This would've fixed the
problem but required manually editing the file. As usual, I'm completely
disgusted but not surprised.

Any more palatable suggestions are welcomed.

Ciao,
Dee

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Dee Holtsclaw
Sent: Wednesday, October 22, 2003 11:05 AM
To: Windev; MSVC List
Subject: [windev] Enum/typedef namespace bug with #import


I'm hoping someone out in the ether has a workaround for the enum #import
bug in VC++6. I really need to keep the namespace to avoid naming clashes.
In the process of all this, I've noticed the following:

1. If the typedef'd name is the same as the enumeration tag, it's referenced
as 'enum X', otherwise just 'X'. In this later case, the compiler also gets
lost and nukes upon encountering the first such unqualified (and thereby
unknown) type.

2. No enum tags or typedefs are qualified with the namespace tag but
interfaces and coclasses are.

3. Manually editing the '.tli' causes the compiler to immediately regenerate
it.

4. Adding a 'using namespace' fixes these errors but, regretfully, causes
other problems (such as a multitude of 'ambiguous symbol' errors).

The control being #imported is completely under my control so I can muck
with it's IDL as much as needed. It's been tested in VB and appears fine so
I'd prefer not to break that but now I'm inserting it into the client apps
and really need it to be done using the import rather than dragging the .h
file. Manually editing the .tlh & .tli also needs to be avoided since I
expect to be making modifications to the control as I integrate the client
code (I could build a SED script but...).

<RANT>
On a personal note, I'd like to add that Microsoft must have been aware of
this problem for years. If it's not been fixed (and I saw no indication of
this last night on their web pages), the responsible party should be
terminated with prejudice. There is NO excuse for this kind of sloppy
product, especially after so many service packs. I was going to add a bug
report but that part of the site was broken (surprise!).
</RANT>

TIA!

Ciao,
Dee

--
Windev mailing list at [EMAIL PROTECTED]

Lost your password?  Need to unsubscribe or change your delivery options?
Go to http://www.lesher.ws/mailman/listinfo/windev
--
Search the Windev Archives - www.windev.org

--
Windev mailing list at [EMAIL PROTECTED]

Lost your password?  Need to unsubscribe or change your delivery options?
Go to http://www.lesher.ws/mailman/listinfo/windev
--
Search the Windev Archives - www.windev.org
--
Windev mailing list at [EMAIL PROTECTED]

Lost your password?  Need to unsubscribe or change your delivery options?
Go to http://www.lesher.ws/mailman/listinfo/windev
--
Search the Windev Archives - www.windev.org

Reply via email to