How to fix "Error C2504 'CLifetimeCuller': base class undefined" error in vs2019

Praveer Kumar (pkumar) 1 Reputation point
2023-07-11T10:53:18.27+00:00

Hi,

I have a legacy project and we are upgrading the project's IDE from vs2003 to 2019.

it is a long jump. I am having a problem, which is a bottleneck for the delivery.

Problem:

Error C2504 'CLifetimeCuller': base class undefined

Based on the investigation, I found that the CLifetimeCuller class was declared in atlcache.h file, and this file has been removed from vs2008.

I am having a lot of errors due to not having atlcache.h file in vs2019. Could somebody suggest to me how I can resolve the error?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,451 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RLWA32 38,956 Reputation points
    2023-07-11T13:13:58.18+00:00

    The atlcache.h file was a part of the ancient ATLServer that was released to the public many years ago by Microsoft which ceased maintaining it.

    An internet search found a copy of that file at https://github.com/gabegundy/atlserver/blob/master/include/atlcache.h

    You will need to determine if that copy (and any other old ATLServer files) can be successfully used with VS2019.

    Also, see https://devblogs.microsoft.com/cppblog/atl-server-visual-c-shared-source-software/