我正在尝试使用 Visual Studio 2012 构建应用程序我在编译时遇到以下错误
C:\Program Files\Microsoft Visual Studio 11.0\VC\include\tchar.h(24): fatal error C1189: #error : 需要在 tchar.h 之后包含 strsafe.h
我在 stdafx.h 文件中的 strsafe.h 之后包含了 tchar.h。我仍然遇到同样的错误。如何解决这个问题
最佳答案
Reverse the order of inclusion? The error states that you should(*) include
strsafe.h
aftertchar.h
. – Joachim Pileborg May 31 '13 at 8:25
(*) == 必须
Move the #include for tchar.h up in the list of includes. And do consider not including it at all, these tchar practices date from the previous century. There is no version of Windows left that still needs it. The floppy disk drive on the last machine that still boots a non-Unicode version of Windows died last week, problem solved. – Hans Passant May 31 '13 at 12:50
关于c++ - 需要在 tchar.h 错误后包含 strsafe.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16852925/