简体   繁体   中英

How to properly include ATL into Embarcadero project

I've been given a legacy Visual C++ project that I need to compile in Embarcadero RAD Studio XE7, but I have a problem with building it. For now, I have a problem with ATL libraries, which are needed for some components of the project:

  • I already copied all ATL files from include/atl to windows/sdk/atl

  • the project requires atlsafe.h . I've installed Visual Studio 2013, which has these headers, but I do understand how to use them properly. In case I copy atlsafe.h to windows/sdk/atl , I start to receive lots of errors which are related to the outdated atlbase.h . Once I replace atlbase.h , I start to receive more errors (expectedly), and so on.

Generally, the question is, how do I properly configure my C++Builder project for ATL, and where do I obtain the correct version of the headers? For example, for the boost headers, the problem was solved very easy (build proper version and add path to headers to -I directive).

Embarcadero dropped support for ATL in C++Builder XE , replacing ATL with the Delphi ActiveX framework (DAX). In order to use ATL in C++Builder projects in XE and later, you need to obtain ATL support files (headers and library binaries) from an earlier C++Builder version, you can't use the ones from Visual Studio. If you don't have access to an older C++Builder version, then you will have to forget about ATL and migrate the project to DAX instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM