Hi,

My project depends on a COM component and I've set up this dependency in the
DevStudio's Project Dependencies dialog so that COM component is first
built. However, it cannot be built since it in turn depends on my project
(which exposes a COM interface). Hence, I manually have to compile my
project's IDL file which generates the necessary files for the COM component
which then can be built. Having done that, I can then sucessfully build my
project.

This is annoying, I'd like to make this build process automatic but I'm not
sure how. It seems to be overkill trying to break that dependency cycle.
Can I configure my project to first compile my IDL file, then build the
other COM component and after that build my project. How?

Thanks,
Jones



My app uses a COM component which in turn uses my app through the exposed
interface exposes a COM-interface so it can be used by a client. One such
client is used by my MFC app.
I've Win32 project which builds an app.
This app is run as an ordinary application and it can be used for autohas
depends on a COM-server

Re: Compilation... by Anand

Anand
Tue Aug 19 07:52:52 CDT 2003

I'd suggest, create your own MAKE file for the project.
First compile your IDL and then build second COM. But I
could not understand the design!! These components are
tightly coupled. Motive behind COM is, reusable
independent modules which is easy to use and modify.

What I understand from your design is, you have two COM
components depending each other to work properly, right?
Why don't you reconsider you design phase.

Enjoy...
Anand Raval
(remove 1 for mail)


>-----Original Message-----
>Hi,
>
>My project depends on a COM component and I've set up
this dependency in the
>DevStudio's Project Dependencies dialog so that COM
component is first
>built. However, it cannot be built since it in turn
depends on my project
>(which exposes a COM interface). Hence, I manually have
to compile my
>project's IDL file which generates the necessary files
for the COM component
>which then can be built. Having done that, I can then
sucessfully build my
>project.
>
>This is annoying, I'd like to make this build process
automatic but I'm not
>sure how. It seems to be overkill trying to break that
dependency cycle.
>Can I configure my project to first compile my IDL file,
then build the
>other COM component and after that build my project. How?
>
>Thanks,
>Jones
>
>
>
>My app uses a COM component which in turn uses my app
through the exposed
>interface exposes a COM-interface so it can be used by a
client. One such
>client is used by my MFC app.
>I've Win32 project which builds an app.
>This app is run as an ordinary application and it can be
used for autohas
>depends on a COM-server
>
>
>.
>

Re: Compilation... by Alan

Alan
Tue Aug 19 08:02:15 CDT 2003

I've never used it, but I think what you want is "Project/Settings/Pre-link-setup".
You can put specific commands in there to run after the compile completes, but before
the linker is invoked.

- Alan


"Mr. Jones" <someone@microsoft.com> wrote in message
news:nBk0b.4608$Y5.1190@nntpserver.swip.net...
> Hi,
>
> My project depends on a COM component and I've set up this dependency in the
> DevStudio's Project Dependencies dialog so that COM component is first
> built. However, it cannot be built since it in turn depends on my project
> (which exposes a COM interface). Hence, I manually have to compile my
> project's IDL file which generates the necessary files for the COM component
> which then can be built. Having done that, I can then sucessfully build my
> project.
>
> This is annoying, I'd like to make this build process automatic but I'm not
> sure how. It seems to be overkill trying to break that dependency cycle.
> Can I configure my project to first compile my IDL file, then build the
> other COM component and after that build my project. How?
>
> Thanks,
> Jones
>
>
>
> My app uses a COM component which in turn uses my app through the exposed
> interface exposes a COM-interface so it can be used by a client. One such
> client is used by my MFC app.
> I've Win32 project which builds an app.
> This app is run as an ordinary application and it can be used for autohas
> depends on a COM-server
>
>



Re: Compilation... by Arnaud

Arnaud
Tue Aug 19 18:06:10 CDT 2003

Mr. Jones wrote:
> Hi,
>
> My project depends on a COM component and I've set up this dependency
> in the DevStudio's Project Dependencies dialog so that COM component
> is first built. However, it cannot be built since it in turn depends
> on my project (which exposes a COM interface). Hence, I manually have
> to compile my project's IDL file which generates the necessary files
> for the COM component which then can be built. Having done that, I
> can then sucessfully build my project.

Remove the IDL file from your app project and put it in a third,
independant, project that is build before the 2 others. It's quite usual and
natural that the interface (the IDL) is independant of the implementation,
and therefore it should be compiled separately.

Arnaud
MVP - VC