我在 64 位 Windows 7 上使用 MinGW g++ 4.6.2。至于 IDE,我使用 Eclipse CDT。
我的项目有问题 - 当我包含“Windows.h”文件时,我遇到了数千个错误。我试图创建一个仅包含 Windows.h 的不同文件,但它给出了相同的错误。
。H:
/*
* WinWrapper.h
*
* Created on: Feb 24, 2013
* Author: martin
*/
#ifndef WINWRAPPER_H_
#define WINWRAPPER_H_
char* winGetMainModule();
#endif /* WINWRAPPER_H_ */
.cpp:
#include "WinWrapper.h"
#include <windows.h>
char* winGetMainModule() {
return nullptr;
}
没有其他文件包括“WinWrapper.h”或 Windows.h。
template with C linkage GameProj line 172, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\bits\locale_classes.tcc C/C++ Problem
template with C linkage GameProj line 228, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\bits\locale_classes.tcc C/C++ Problem
template with C linkage GameProj line 128, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\bits\locale_classes.tcc C/C++ Problem
template with C linkage GameProj line 133, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\bits\locale_classes.tcc C/C++ Problem
confused by earlier errors, bailing out GameProj line 118, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\bits\ios_base.h C/C++ Problem
declaration of C function 'constexpr std::_Ios_Openmode std::operator&(std::_Ios_Openmode, std::_Ios_Openmode)' conflicts with GameProj line 117, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\bits\ios_base.h C/C++ Problem
previous declaration 'constexpr std::_Ios_Fmtflags std::operator&(std::_Ios_Fmtflags, std::_Ios_Fmtflags)' here GameProj line 77, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\bits\ios_base.h C/C++ Problem
template with C linkage GameProj line 614, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\type_traits C/C++ Problem
template with C linkage GameProj line 623, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\type_traits C/C++ Problem
template with C linkage GameProj line 629, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\type_traits C/C++ Problem
template with C linkage GameProj line 636, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\type_traits C/C++ Problem
template with C linkage GameProj line 592, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\type_traits C/C++ Problem
template with C linkage GameProj line 598, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\type_traits C/C++ Problem
template with C linkage GameProj line 602, external location: c:\mingw\lib\gcc\mingw32\4.6.2\include\c++\type_traits C/C++ Problem
... + 大约 200 KB 的其他错误日志
其他项目信息:
- 使用库 SDL、SDL_Image
- 定义了 TARGET_WINX86
- 编译器标志 -c -fmessage-length=0 -std=c++0x
不知道发生了什么。请帮忙,提前谢谢:))