[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-atl
Subject:    Re: Setting up VC++ for multiple IDL files.
From:       Scott Bloom <sbloom () CALWEB ! COM>
Date:       1998-09-29 21:42:36
[Download RAW message or body]


Kevin,

I did this a while ago in VC5. I'm guessing that the generated project.h
file has a "include "interface.h" directive, for a file which isn't
accessible to the compiler. From memory...

- put your interface.idl in a "global" include directory (any IDL that
imports it will try and import the interface.h file produced by MIDL.
- add the interface.idl project to any project that needs it
- in the build settings for that file, put in the MIDL build command to
build it

When your project.idl file is compiled, it will import the include.idl (and
generate a "include interface.h" in the generated project.h file). Your
project must be able to find this interaface.h file at compile time.

One bad point about this is that you lose wizard control/usage for the
interface.IDL files - that is you can't use the VC5 wizards to create
methods/properties on the interfaces defined in the non-project.idl - not a
big deal.

Hope that helps,
Scott

> -----Original Message-----
> From: ATL - Active Template Library [mailto:ATL@DISCUSS.MICROSOFT.COM]On
> Behalf Of kevin.burton@EXGATE.TEK.COM
> Sent: Tuesday, September 29, 1998 9:11 AM
> To: ATL@DISCUSS.MICROSOFT.COM
> Subject: Setting up VC++ for multiple IDL files.
>
>
> This is probably slightly off topic but I hope that there is someone that
> can give me some pointers.
>
> As recommended by Don Box (and others), I have taken my interface
> descriptions and put them in a separate IDL file (interface.idl).
> The "main"
> IDL file (main.idl) includes this IDL as follows:
>
> import "Interface.idl"
>
> This works just fine but when I do a "Rebuild All" the MIDL
> compiler refuses
> to compile it telling me to search for a workaround. If I go to a DOS box
> and invoke:
>
>         midl /Oicf /h "Interface.h" /iid "Interface_i.c" "Interface.idl"
>
> then the build works just fine. How do I set up the dependencies
> so that the
> IDE knows how to build main.idl AND Interface.idl? Any
> suggestions would be
> greatly appreciated.
>
> Thank you.
>
> Kevin Burton
> Kevin.Burton@tek.com
>
> ----------------------------------------------------------------
> Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
> contains important info including how to unsubscribe.  Save time, search
> the archives at http://discuss.microsoft.com/archives/index.html
>

----------------------------------------------------------------
Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic