
nmake on proxy/stub results in unresolved externals
Also, it might make more sense to build a single proxy/stub DLL for
all related interfaces (perhaps there are others...). Copy all IDL files
in a single folder, MIDL them there, then write a makefile that includes
all generated _i.c and _p.c (plus dlldata.c) files and build with it.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
Quote:
> You probably need to link with base_i.c file generated from base.idl.
> Open the .mk file and add base_i.* wherever derived_i.* is mentioned.
> Should be fairly obvious.
> --
> With best wishes,
> Igor Tandetnik
> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken
> > Hi,
> > Here's the scenario: I have a IMyBase defined in \base\base.idl and
> > interface IMyDerived : IMyBase defined in \derived\derived.idl. Also I
> > import base.idl in derived.idl.
> > base.idl builds properly and nmake on baseps.mk builds correctly.
> > derived.idl also builds properly but nmake on derivedps.mk results in
> an
> > unresolved external linker error:
> > Creating library derivedps.lib and object derivedps.exp
> > derived_p.obj : error LNK2001: unresolved external symbol _IID_IMyBase
> > DERIVED.dll : fatal error LNK1120: 1 unresolved externals
> > NMAKE : fatal error U1077: 'link' : return code '0x460' Stop.
> > I've noticed that IID_IMyBase is referenced in derived_p.c but not
> actually
> > externed.
> > In derived_p.c #includes derived.h which in turn #includes base.h
> where
> > there is: EXTERN_C const IID IID_IMyBase.
> > Hope that's not too confusing, many thanks in advance,
> > Babak.