c++ - Codeblocks 的 Cygwin 编译器不工作

标签 c++ cygwin codeblocks toolchain

使用带有代码块的 Cygwin 的默认设置,我收到以下错误。

"NameScanner - Debug" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
Nothing to be done.

我试过他们的 custom installation instructions这让我在默认文件 cstdlib 上出现了这个错误

C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\cwchar|249|error: `::wcstold' has not been declared|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\cwchar|265|error: `__gnu_cxx::wcstold' has not been declared|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\cstdlib|181|error: `::strtold' has not been declared|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\cstdlib|200|error: `__gnu_cxx::strtold' has not been declared|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|44|error: `_UPPER' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|45|error: `_LOWER' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|46|error: `_ALPHA' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|47|error: `_DIGIT' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|48|error: `_HEX' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|49|error: `_SPACE' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|50|error: `_BLANK' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|50|error: `_PUNCT' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|50|error: `_ALPHA' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|50|error: `_DIGIT' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|51|error: `_PUNCT' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|51|error: `_ALPHA' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|51|error: `_DIGIT' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|52|error: `_CONTROL' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|53|error: `_PUNCT' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|54|error: `_ALPHA' was not declared in this scope|
C:\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\mingw32\bits\ctype_base.h|54|error: `_DIGIT' was not declared in this scope|
C:\...\NameScanner\name.cpp|3|regex: No such file or directory|
C:\...\NameScanner\name.cpp||In constructor `Name::Name(std::string)':|
C:\...\NameScanner\name.cpp|19|error: `regex_match' undeclared (first use this function)|
C:\...\NameScanner\name.cpp|19|error: (Each undeclared identifier is reported only once for each function it appears in.)|
||=== Build finished: 24 errors, 0 warnings ===|

任何帮助都将不胜感激。

最佳答案

我建议你卸载一切,下载this codeblocks 的版本并安装它。它已经包含了您需要的一切(即 GCC)。

关于c++ - Codeblocks 的 Cygwin 编译器不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24112160/

相关文章:

c++ - 有没有一种方法可以指定枚举类值,而不必每次都键入其范围?

Cygwin 和 Netbeans : run on default Windows shell?

c++ - c++ 计算一个程序的运行时间(以秒为单位)

C++ 链接器错误 - 'undefined reference' 不内联定义的函数

c++ - 在 C++23 中显式 *this 对象参数提供什么?

c++ - 在 C++ 和 Mysql 中,从 std::sqlString 到 char const* 的转换无效

c++ - std::reference_wrapper 对比整数&

linux - 在 bash 中的两个非常 'different' 位置之间移动文件

bash - 如何检查是否在 Cygwin、Mac 或 Linux 中运行?

c - 在我的 C 程序中收到错误 "Unexpected unqualified-id"..