打开_ATL_ATTRIBUTES时CL.EXE中的预处理问题 [英] Preprocessing problem in CL.EXE when _ATL_ATTRIBUTES is on

查看:118
本文介绍了打开_ATL_ATTRIBUTES时CL.EXE中的预处理问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#define _ATL_ATTRIBUTES 1  
#include <atlbase.h>  
#include <atlcom.h>  


[ module(dll, name="EventSource", uuid="6E46B59E-89C3-4c15-A6D8-B8A1CEC98830") ];  

如果使用CL.exe显式预处理上述示例代码并重新编译它,则会出现语法错误。

预处理命令为如下:

Cl.exe / E / LD server.cpp> test.i.cpp

Cl.exe / LD test.i.cpp



以上代码是不会导致任何问题的代码编译时没有明确的预处理。



$
可能是CL的预处理器有问题,但我不知道为什么。此时由于与覆盖率测量工具的互通而将输入作为预处理文件存在问题。



我能得到一些建议吗?

If you explicitly preprocess the above sample code with CL.exe and recompile it, you will get a syntax error.
The preprocessing command is as follows:
Cl.exe / E / LD server.cpp> test.i.cpp
Cl.exe / LD test.i.cpp

The above code is code that does not cause any problems when compiled without explicit preprocessing.


Probably it's a problem with CL's preprocessor, but I'm not sure why. There is a problem at this point in providing input as preprocessed files due to interworking with coverage measurement tools.

Can I get some advice?

最好的问候,

- < g class =" gr_ gr_32 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace"数据-GR-ID =" 32" id =" 32"> Min hyuk< / g>

- <g class="gr_ gr_32 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="32" id="32">Min hyuk</g>

推荐答案

我建议您远离属性ATL代码。 它已被弃用。请参阅
https://msdn.microsoft.com/en-us/library/mt723604.aspx ,部分
归属ATL代码支持的弃用


这篇关于打开_ATL_ATTRIBUTES时CL.EXE中的预处理问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆