From: Angie on
all,

I have a RPC client that wants to talk with two RPC servers. When I
integrated both IDL file into the client code, I got a name conclifct in a C
file generated by MIDL compiler. Is there anyone who knows how to fix
this type of problem casued by MIDL compiler?

==========================
UTrafficService.obj : error LNK2005: ___MIDL_ProcFormatString already
defined in UFilterService.obj
UTrafficService.obj : error LNK2005: ___MIDL_TypeFormatString already
defined in UFilterService.obj
UTrafficService.obj : warning LNK4006: ___MIDL_ProcFormatString already
defined in UFilterService.obj; second definition ignored
UTrafficService.obj : warning LNK4006: ___MIDL_TypeFormatString already
defined in UFilterService.obj; second definition ignored
Creating library Debug/urxdialer.lib and object Debug/urxdialer.exp


From: Doron Holan [MSFT] on
this may not be 100% helpful, but the midl compiler for all of my generated
c and h files prepends the idl file's name to these globals, for instance
foo.idl would generate

extern const foo_MIDL_TYPE_FORMAT_STRING foo__MIDL_TypeFormatString;
extern const foo_MIDL_PROC_FORMAT_STRING foo__MIDL_ProcFormatString;
extern const foo_MIDL_EXPR_FORMAT_STRING foo__MIDL_ExprFormatString;

i am not sure if there is a cmd line flag to control this or not

d


--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Angie" <kimojolin(a)yahoo.com> wrote in message
news:%23vnqNUuEJHA.768(a)TK2MSFTNGP05.phx.gbl...
> all,
>
> I have a RPC client that wants to talk with two RPC servers. When I
> integrated both IDL file into the client code, I got a name conclifct in a
> C file generated by MIDL compiler. Is there anyone who knows how to
> fix this type of problem casued by MIDL compiler?
>
> ==========================
> UTrafficService.obj : error LNK2005: ___MIDL_ProcFormatString already
> defined in UFilterService.obj
> UTrafficService.obj : error LNK2005: ___MIDL_TypeFormatString already
> defined in UFilterService.obj
> UTrafficService.obj : warning LNK4006: ___MIDL_ProcFormatString already
> defined in UFilterService.obj; second definition ignored
> UTrafficService.obj : warning LNK4006: ___MIDL_TypeFormatString already
> defined in UFilterService.obj; second definition ignored
> Creating library Debug/urxdialer.lib and object Debug/urxdialer.exp
>