C++编译错误syntax error : identifier 'THIS_FILE' 解决方法
来源:互联网 发布:软件商业计划书范文 编辑:程序博客网 时间:2024/06/10 08:51
你到代码里搜索 THIS_FILE看是不是它定义在别的头文件前面了,如果是,把它们的头文件紧跟到Stdafx.h后面
我遇到过这问题,这样搞定的
我遇到过这问题,这样搞定的
今天遇到个编译错误:..\vc98\include\new(35) : error C2061: syntax error : identifier 'THIS_FILE',我的某个.cpp中是这样写的:
#include "stdafx.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include "myUtil.h"
百度了下说是#include顺序问题,要放到'THIS_FILE'定义之前,改成如下即可:
#include "stdafx.h"
#include "myUtil.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
0 0
- C++编译错误syntax error : identifier 'THIS_FILE' 解决方法
- 【转】编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'
- 编译过程中弹出new(35) : error C2061: syntax error : identifier 'THIS_FILE'问题的原因及解决方法
- error C2061: syntax error : identifier 'THIS_FILE'
- error C2061: syntax error : identifier 'THIS_FILE'
- error C2061: syntax error : identifier 'THIS_FILE'
- 编译错误:syntax error : identifier '__RPC__in'
- 编译错误:syntax error : identifier '__RPC__in'
- 编译错误error C2370: 'THIS_FILE' : redefinition的解决方法
- VS2005编译问题:出现错误error C2146: syntax error : missing ';' before identifier 'SQLHWND'
- directX编译连接错误 error C2146: syntax error : missing ';' before identifier 'PVOID64'
- syntax error : missing ';' before identifier 'PVOID64' (DSHOW开发编译错误 winnt.h)
- vs2005 C编译错误syntax error : missing ';' before 'type'
- 贪心算法总结
- 愚人节自语
- mongoDB——wiredTiger副本集模型的成员角色
- php的PDO
- listBox绑定数据源与模糊筛选
- C++编译错误syntax error : identifier 'THIS_FILE' 解决方法
- 进程通信
- vim使用技巧之翻页
- 简谈高通Trustzone的实现
- WIN7 SSD固态硬盘做系统盘的优化
- 聊聊Spring事务管理
- js每3位逗号分隔数字
- window.open()
- Android中APP、AMS、WMS的Binder IPC