简体   繁体   English

如何将ATL正确地纳入Embarcadero项目

[英]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. 我得到了一个旧的Visual C ++项目,需要在Embarcadero RAD Studio XE7中进行编译,但是在构建它时遇到了问题。 For now, I have a problem with ATL libraries, which are needed for some components of the project: 目前,我对ATL库有问题,这是项目某些组件所必需的:

  • I already copied all ATL files from include/atl to windows/sdk/atl 我已经将所有ATL文件从include/atl复制到windows/sdk/atl

  • the project requires atlsafe.h . 该项目需要atlsafe.h I've installed Visual Studio 2013, which has these headers, but I do understand how to use them properly. 我安装了具有这些标头的Visual Studio 2013,但我确实了解如何正确使用它们。 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 . 如果我将atlsafe.h复制到windows/sdk/atl ,我开始会收到许多与过时的atlbase.h相关的错误。 Once I replace atlbase.h , I start to receive more errors (expectedly), and so on. 替换atlbase.h ,我开始收到更多错误(按预期),依此类推。

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? 通常,问题是,如何为ATL正确配置我的C ++ Builder项目,以及从哪里获得正确版本的标头? For example, for the boost headers, the problem was solved very easy (build proper version and add path to headers to -I directive). 例如,对于boost头文件,问题很容易解决(构建适当的版本并将头文件的路径添加到-I指令)。

Embarcadero dropped support for ATL in C++Builder XE , replacing ATL with the Delphi ActiveX framework (DAX). Embarcadero在C ++ Builder XE中放弃了对ATL的支持 ,用Delphi ActiveX框架(DAX)替代了ATL。 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. 为了在XE和更高版本的C ++ Builder项目中使用ATL,您需要从早期的C ++ Builder版本中获取ATL支持文件(标头和库二进制文件),而不能在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. 如果您无权使用较旧的C ++ Builder版本,则必须忘记ATL并将项目迁移到DAX。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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