Re: MIDL file query

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Gary Chang[MSFT] wrote:
Hi Sue,

That's OK. MIDL just generates the code to declare an MIDL_TYPE_FORMAT_STRING object with external visible, then use the "static" define it. The "extern" declares the static storage class object, so there is no problem using the "static" to define it.

No problem except that for historical reasons I need to compile the file using a non-MS compiler, and it complains. I have to change the static to extern to make it compile.

At this stage, I can compile and run the output from MIDL V2, but although I can get the output from MIDL V6 (latest SDK) to compile by changing static to extern, as yet have been unable to get it to run without crashing - I think in the RpcServerListen routine the first time a call is made from the client. Are there any gotchas I should know about or other tips for using MIDL V6 with other compilers ? Is there a document somewhere that specifies what settings are needed ?

Thanks,

Sue
.



Relevant Pages

  • Re: question about extern ?..
    ... > also program compiles and runs fine with x declared as extern. ... > So is it necessary to declare x as extern if one get away without ... let's say you have a CPP file as so: ... In this case, you won't get a compile error at all, but a Link errror, the ...
    (comp.lang.cpp)
  • Re: Problem Linking (win32)
    ... version of nasm and the latest version of golink. ... extern MessageBoxA ... your application to compile, link and run. ... A consistent error occurs upon the loading of my asm. ...
    (comp.lang.asm.x86)
  • Re: Static _Bool initialization
    ... Are you assuming some kind of wrap-around pointer value, ... Michal Necasek wrote: ... at compile time for the program to compile. ... For all non-array extern objects, ...
    (comp.std.c)
  • Re: gcc compiling problems :extern "C"
    ... I tried with sample files but I couldn't compile the C sourcecode... ... void myfun; ... This code is compiled without the extern "C" declaration in view, ... This now expects an extern "C" myfun() somewhere. ...
    (comp.os.linux.development.apps)
  • Re: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.29-0
    ... It doesn't compile. ... I tried to fix the compilation errors with these 2 one-liners: ... extern unsigned long wall_jiffies; ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)