http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/66b85455-d667-44dc-adcb-1e1d2aa6f50b
找到了这里
Never mind. The cause of the problem has been found. The identifier "_DebugHeapTag_func" is used in the "xdebug" file line 27 to define "_NEW_CRT" as "new(std::_DebugHeapTag_func(), __FILE__, __LINE__)". The problem turned out to be that somewhere else in the project, the "new" function was redefined to a format not compatible with "std::_DebugHeapTag_func". Once the redefinition of "new" was removed, the problem was gone.All hints from the experts in this thread are very helpful and greatly appreciated. Thanks.
这段话...
貌似也没说怎么解决啊哪位大哥遇到过类似的问题?
下面是详细的出错日志:
1>c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(283) : error C2061: 语法错误 : 标识符“_DebugHeapTag_func”
1> c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(281): 编译类 模板 成员函数“size_t std::moneypunct<_Elem,_Intl>::_Getcat(const std::locale::facet **,const std::locale *)”时
1> with
1> [
1> _Elem=char,
1> _Intl=true
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(908): 参见对正在编译的类 模板 实例化“std::moneypunct<_Elem,_Intl>”的引用
1> with
1> [
1> _Elem=char,
1> _Intl=true
1> ]
1>URLDlg.cpp
1>RepositoryBar.cpp
1>RepoDrags.cpp
1>RenameDlg.cpp
1>正在生成代码...
1>正在编译...
1>Blame.cpp
1>BlameDlg.cpp
1>EditPropConflictDlg.cpp
1>EditPropertiesDlg.cpp
1>EditPropertyValueDlg.cpp
1>AddDlg.cpp
1>c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(283) : error C2061: 语法错误 : 标识符“_DebugHeapTag_func”
1> c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(281): 编译类 模板 成员函数“size_t std::moneypunct<_Elem,_Intl>::_Getcat(const std::locale::facet **,const std::locale *)”时
1> with
1> [
1> _Elem=char,
1> _Intl=true
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(908): 参见对正在编译的类 模板 实例化“std::moneypunct<_Elem,_Intl>”的引用
1> with
1> [
1> _Elem=char,
1> _Intl=true
1> ]
1>LogDlgHelper.cpp
1>CopyDlg.cpp
1>正在生成代码...
1>生成日志保存在“file://e:\SourceCode\FileBank\FileBank\Debug\BuildLog.htm”
1>FileBank - 2 个错误,3 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
找到了这里
Never mind. The cause of the problem has been found. The identifier "_DebugHeapTag_func" is used in the "xdebug" file line 27 to define "_NEW_CRT" as "new(std::_DebugHeapTag_func(), __FILE__, __LINE__)". The problem turned out to be that somewhere else in the project, the "new" function was redefined to a format not compatible with "std::_DebugHeapTag_func". Once the redefinition of "new" was removed, the problem was gone.All hints from the experts in this thread are very helpful and greatly appreciated. Thanks.
这段话...
貌似也没说怎么解决啊哪位大哥遇到过类似的问题?
下面是详细的出错日志:
1>c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(283) : error C2061: 语法错误 : 标识符“_DebugHeapTag_func”
1> c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(281): 编译类 模板 成员函数“size_t std::moneypunct<_Elem,_Intl>::_Getcat(const std::locale::facet **,const std::locale *)”时
1> with
1> [
1> _Elem=char,
1> _Intl=true
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(908): 参见对正在编译的类 模板 实例化“std::moneypunct<_Elem,_Intl>”的引用
1> with
1> [
1> _Elem=char,
1> _Intl=true
1> ]
1>URLDlg.cpp
1>RepositoryBar.cpp
1>RepoDrags.cpp
1>RenameDlg.cpp
1>正在生成代码...
1>正在编译...
1>Blame.cpp
1>BlameDlg.cpp
1>EditPropConflictDlg.cpp
1>EditPropertiesDlg.cpp
1>EditPropertyValueDlg.cpp
1>AddDlg.cpp
1>c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(283) : error C2061: 语法错误 : 标识符“_DebugHeapTag_func”
1> c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(281): 编译类 模板 成员函数“size_t std::moneypunct<_Elem,_Intl>::_Getcat(const std::locale::facet **,const std::locale *)”时
1> with
1> [
1> _Elem=char,
1> _Intl=true
1> ]
1> c:\program files\microsoft visual studio 9.0\vc\include\xlocmon(908): 参见对正在编译的类 模板 实例化“std::moneypunct<_Elem,_Intl>”的引用
1> with
1> [
1> _Elem=char,
1> _Intl=true
1> ]
1>LogDlgHelper.cpp
1>CopyDlg.cpp
1>正在生成代码...
1>生成日志保存在“file://e:\SourceCode\FileBank\FileBank\Debug\BuildLog.htm”
1>FileBank - 2 个错误,3 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
检查一下程序中有没有自己定义 new (not compatible with "std::_DebugHeapTag_func")
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
如果是MFC程序的话,自动生成的cpp文件都有这个,跟stl里面的冲突了,把这个注释掉应该就可以了
当我把#include <boost/XXX>放在.H文件里,就不报错了。