Eclipse CDT:错误:'::wcstold'尚未使用 MinGW 声明
我正在尝试在 Eclipse CDT 中编译我的游戏,最初是用 VC++ 编写的。我从他们的网站下载了 MinGW。我在编译时收到此错误:
c:\mingw\bin../lib/gcc/mingw32/4.6.1/include/c++/cwchar:250:11: 错误:“::wcstold”尚未声明 c:\mingw\bin../lib/gcc/mingw32/4.6.1/include/c++/cwchar:266:22: 错误:“__gnu_cxx::wcstold”尚未声明
为什么它们没有定义?有什么我忘记包括的吗?
I'm trying to compile my game, originally written in VC++, in Eclipse CDT. I've downloaded MinGW from their website. I get this error when I'm compiling:
c:\mingw\bin../lib/gcc/mingw32/4.6.1/include/c++/cwchar:250:11:
error: '::wcstold' has not been declared
c:\mingw\bin../lib/gcc/mingw32/4.6.1/include/c++/cwchar:266:22:
error: '__gnu_cxx::wcstold' has not been declared
Why are they not defined? Is there something I forgot to include?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我遇到了同样的问题。我在同一系统上安装了cygwin,并意外地将cygwin提供的包含文件添加到项目配置中。
从 CDT“C/C++ General”中删除 cygwin 的包含文件 -> “路径和符号”-> “包括”窗口解决了这个问题。
I ran into the same problem. I installed cygwin on the same system and accidentally added the include files provided by cygwin to the project configuration.
Removing cygwin's include files from CDTs "C/C++ General" -> "Paths and Symbols" -> "Includes" window solved the problem.
你没有做错事。这是由于 MinGW 在移植新的 Windows API 方面有一些延迟造成的。
请参阅此博文了解如何解决这个问题。
You didn't do wrong thing. It's caused by MinGW has some delay to port the new Windows API.
See this blog post for how resolve this issue.
如果你的游戏使用SDL,你应该下载不同的库,VC++和Mingw使用不同的库和头文件
If your game uses SDL you should download diffetent libraries, VC++ and Mingw use diferent libraries and headers