尚未声明附加控制台
AttachConsole has not been declared
我从这里得到了wxWidget的主分支。我从这里下载了tdm-gcc(我确定我使用的mingw32-make来自tdm-gcc内部)。按照wxWiki的指示,我在powershell上执行了(多次尝试)
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release clean
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release
但是我不断收到错误
../../src/msw/app.cpp: In member function 'bool {anonymous}::wxConsoleStderr::DoInit()':
../../src/msw/app.cpp:416:11: error: '::AttachConsole' has not been declared
if ( !::AttachConsole(ATTACH_PARENT_PROCESS) )
^
makefile.gcc:14269: recipe for target 'gcc_mswucorelib_app.o' failed
mingw32-make: *** [gcc_mswucorelib_app.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
插入
#ifndef WINVER
#define WINVER 0x0603
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0603
#endif
#ifndef _WIN32_IE
#define _WIN32_IE 0x0700
#endif
以前
#include <_mingw.h>
在include/wx/msw/gccpriv.h
.(这会将此部分 GitHub 拉取请求应用于分发的 wxWidgets 3.1.0。下一个 wxWidgets 版本,无论是 3.1.1 还是 3.2.0,都应该可以解决此问题。
相关文章:
- #ifdef和未声明的标识符
- 未声明的标识符编译暗黑破坏神 2 程序"muleview"
- 在顶点着色器中使用 OpenGl 的未声明标识符,我在顶点着色器中绘制三角形时遇到问题
- Google protobuf 时间戳未声明标识符,在 Windows 上具有C++
- 在气泡排序程序中未声明错误功能
- 我在范围内未声明的错误类有问题
- 使用未声明的标识符"sqrt"?
- 我包含了<winuser.h>,但编译器在MonitorFromWindow上抛出"未声明"
- 对类 (C++) 中的私有变量使用未声明的标识符
- 我的代码中有错误,未声明的标识符
- 未定义的标识符/未声明
- 错误:在 C++ 'std'使用未声明的标识符
- 在编译器之前检测未声明的标识符
- 使用未声明的标识符'temp'
- 使用未声明的标识符"yylex"和"yyin"?
- 使用"class"关键字,后跟未声明的标识符
- 未声明的标识符错误,但变量定义正确 (?)
- C2065 'cout':未声明的标识符
- 在此范围内未声明错误"Clreol"
- C++模板模板参数中未声明的标识符