Tuesday, March 20, 2012

Plug-in algorithm shell complilation error

I'm trying to create plug-in algorithm using tutorial from Max Chickering and Raman Iyer. I follow steps very carefully and as far as I know my code is exactly the same as Completed shell solution in source files of tutorial. But when I try to compile factory.cpp file I get this error:
Error 1 error C2259: 'ATL::CComObject<Base>' : cannot instantiate abstract class e:\development\ms visual studio 2005\vc\atlmfc\include\atlcom.h 1799

When I compile completed shell solution from source files it's OK. Do you have any ideas, where the problem could be?

Thank you

This most likely indicates that you haven't provided implementation for all the abstract methods from IDMAlgorithm interface. Unfortunately, the error does not point you to that, but rather fails in the code which instantiates the class (cannot instantiate an abstract class).

Hope this helps

Shuvro

|||

The error window of VS only includes this error fragment. However, if you check the Output window after the failed compilation, you will find details about the virtual method that lacks implementation.

Once you find the name of the missing method, you can search it (VS Ctrl+Shift+F, Find in Files) in the original sample source code. Make sure the file containing the code for that method is included and available in your copy of the sample

Hope this helps

No comments:

Post a Comment