Re: IDL namespaces?
It needs #ifdef __cplusplus, e.g.:
cpp_quote("#ifdef __cplusplus")
cpp_quote("namespace MyLib {")
cpp_quote("#endif")
....
cpp_quote("#ifdef __cplusplus")
cpp_quote("}")
cpp_quote("#endif")
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Igor Tandetnik" <itandetnik@mvps.org> wrote in message
news:u64zq8jjGHA.3588@TK2MSFTNGP02.phx.gbl...
Jason S <jmsachs@gmail.com> wrote:
does the IDL -> .h compiling process have any ability to produce
namespaces?
MIDL compiler itself only knows C. However, you could try putting
cpp_quote("namespace MyLib {")
at the top of IDL file, and
cpp_quote("}")
at the bottom (or around a specific struct, enum or interface). I never
tried that, I'm not sure how well it will work out.
--
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