15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


[Help] Help with building the Samples from a Book

SUBRAMANIAN -- SUBRAMANIAN.BALAKRISHNEN@tencor.com
Tuesday, November 05, 1996

Environment : Windows NT 3.51  Visual C++ 4.2b

Hi,

	I am trying to build the example from the book
	" Visual C++ MasterClass" by " Ramirez, et al ".
	In particular I am trying to build the sample under Chapter 17.
	The project is "CISOLE2".
	I get the following compilation warnings and errors.

binddoc.h(57) :	warning C4005: 'DECLARE_OLECMD_MAP' : macro redefinition
binddoc.h(79) :	warning C4005: 'BEGIN_OLECMD_MAP' : macro redefinition
binddoc.h(205) :	error C2259: 'XOleCommandTarget' : cannot instantiate
abstract
		class due to following members:
binddoc.h(205) :	warning C4259: 'long __stdcall 			
		CDocObjectServerDoc::QueryStatus(const struct _GUID
		 *,unsigned long,struct  _tagOLECMD [],struct _tagOLECMDTEXT
		 *)' : pure virtual function was not defined
binddoc.h(218) :	error C2555: 'CDocObjectServerDoc::GetCommandMap' :
		overriding virtual function differs from 		
		'CCmdTarget::GetCommandMap' only by return type or calling
		convention


	I get these errors and warnings wherever the "binddoc.h" is
	included.  I am running the Visual C++ 4.2 ( Enterprise Edition ).
	I don't get any other errors or warnings.

	What am I doing wrong ??


Thanks

Subu Balakrishnan



Mike Blaszczak -- mikeblas@nwlink.com
Sunday, November 10, 1996

At 13:26 11/5/96 -0800, BALAKRISHNEN, SUBRAMANIAN wrote:
>Environment : Windows NT 3.51  Visual C++ 4.2b

>	I am trying to build the example from the book
>	" Visual C++ MasterClass" by " Ramirez, et al ".
>	In particular I am trying to build the sample under Chapter 17.
>	The project is "CISOLE2".
>	I get the following compilation warnings and errors.

The symptoms you describe suggest that the book's sample was designed
for Visual C++ 4.1 and steals code from the BINDSCRB sample from that
version of Visual C++ to implement an OLE server which supports
ActiveX Documents.

The implementation of ActiveX server support in Visual C++ 4.2 is
actually built into MFC 4.2b, which you say you're using.  The
symptoms you describe imply that you include the MFC version of
this support and then turn around and include classes, macros and
functions with the same name.  The names collide and you end up
getting these errors.

You should write to the publisher or authors and ask for
an updated version of the sample.  Maybe they already have one on
their website, which, according to the book, is at http://www.wrox.com/.
On the first page inside the front cover, the publisher suggests writing
to them at feedback@wrox.com, and many of the authors provide their
own electronic mail addresses on one of the overleaf pages.

.B ekiM
http://www.nwlink.com/~mikeblas/
I'm afraid I've become some sort of speed freak.
These words are my own. I do not speak on behalf of Microsoft.





| Вернуться в корень Архива |