调试时出现以下错误,跟踪到MFC源码,出错,怎么解决,是不是要修改一些环境的设置。希望各位大侠提出宝贵的意见!言者有分!
说明:我在生成Dialog based 时选择了Automation自动化支持。
d:\microsoft visual studio\vc98\include\new(35) : error C2061: syntax error : identifier 'THIS_FILE'
d:\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function
d:\microsoft visual studio\vc98\include\new(35) : error C2809: 'operator new' has no formal parameters
d:\microsoft visual studio\vc98\include\new(36) : error C2061: syntax error : identifier 'THIS_FILE'
d:\microsoft visual studio\vc98\include\new(37) : error C2091: function returns function
d:\microsoft visual studio\vc98\include\new(37) : error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,const struct std::nothrow_t &)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl operator new(voi
d))(unsigned int)'
        d:\microsoft visual studio\vc98\include\new(35) : see declaration of 'new'
d:\microsoft visual studio\vc98\include\new(41) : error C2061: syntax error : identifier 'THIS_FILE'
d:\microsoft visual studio\vc98\include\new(42) : error C2091: function returns function
d:\microsoft visual studio\vc98\include\new(42) : error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,void *)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl operator new(void))(unsigned int)'
        d:\microsoft visual studio\vc98\include\new(35) : see declaration of 'new'
d:\microsoft visual studio\vc98\include\new(42) : error C2809: 'operator new' has no formal parameters
d:\microsoft visual studio\vc98\include\new(42) : error C2065: '_P' : undeclared identifier
Error executing cl.exe.

解决方案 »

  1.   

    还有关于调试中出现以下问题,怎么解决?
    调用了Windows API函数,为什么不能调用了?SHSoftDogMngDlg.obj : error LNK2001: unresolved external symbol _ReadDog
    SHSoftDogMngDlg.obj : error LNK2001: unresolved external symbol _WriteDog
    SHSoftDogMngDlg.obj : error LNK2001: unresolved external symbol _GetCurrentNo
    SHSoftDogMngDlg.obj : error LNK2001: unresolved external symbol _DogCheck
      

  2.   

    包含.lib文件和头文件,在msdn中查这个函数,看他需要什么lib和h文件。