Discussion:
How do I supress MIDL warnings?
(too old to reply)
e***@gmail.com
2006-09-05 16:35:47 UTC
Permalink
Hi,

When compiling a DLL, I get a lot of MIDL 2111 (identifier length
exceeds 31 characters) from existing tlb's that are shipped with VS. so
I don't want to mess with the code.

I don't want to change the warning level, so that othe rproblems will
still get reported.

Since the MIDL compiler runs before any other files are compiled, where
can I put a #pragma statement?

Come to think of it, do #pragmas even apply to the MIDL compiler? Is
there a special synatx?

Thanks,
Eyal.
Igor Tandetnik
2006-09-05 17:32:20 UTC
Permalink
Post by e***@gmail.com
When compiling a DLL, I get a lot of MIDL 2111 (identifier length
exceeds 31 characters) from existing tlb's that are shipped with VS.
so I don't want to mess with the code.
I don't want to change the warning level, so that othe rproblems will
still get reported.
Since the MIDL compiler runs before any other files are compiled,
where can I put a #pragma statement?
You can put "midl_pragma warning" directive at the top of your IDL file.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
e***@gmail.com
2006-09-05 18:39:27 UTC
Permalink
Post by Igor Tandetnik
You can put "midl_pragma warning" directive at the top of your IDL file.
Ah, but that's the catch - I'm importing an MS tlb for XML handling, so
I'd rather not touch it...any other options?

Thanks,
Eyal.
Igor Tandetnik
2006-09-05 19:06:25 UTC
Permalink
Post by e***@gmail.com
Post by Igor Tandetnik
You can put "midl_pragma warning" directive at the top of your IDL file.
Ah, but that's the catch - I'm importing an MS tlb for XML handling,
so I'd rather not touch it...any other options?
Where are you importing it into, if not your own IDL file?
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
e***@gmail.com
2006-09-05 20:30:15 UTC
Permalink
The problematic idl files weere being imported from my idl, you're
right.

Problem solved.

Thanks!
Post by Igor Tandetnik
Post by e***@gmail.com
Post by Igor Tandetnik
You can put "midl_pragma warning" directive at the top of your IDL file.
Ah, but that's the catch - I'm importing an MS tlb for XML handling,
so I'd rather not touch it...any other options?
Where are you importing it into, if not your own IDL file?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
Loading...