0

Using Microsoft's IDL compiler, if I do this:

midl a.idl /iid iid.cpp

I can't compile iid.cpp on MinGW because of the following warning:

c:\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/rpcproxy.h:14:2: warning: #warning "rpcproxy type definitions require CINTERFACE" [-Wcpp]

But if I generate it as a C file instead, or put -DCINTERFACE on the g++ command line, it compiles. What's the purpose of this flag, and why do I have to set it if I'm compiling as C++?

0xbe5077ed
  • 4,565
  • 6
  • 35
  • 77

1 Answers1

0

By default it uses the pascal calling convention. The mingw functions you are calling won't work with them.

Bob Provencher
  • 431
  • 2
  • 12