简体   繁体   English

AttachConsole尚未声明

[英]AttachConsole has not been declared

I got the master branch of wxWidget from here . 我从这里得到了wxWidget的主分支。 I downloaded tdm-gcc from here (I am certain that mingw32-make which I've used is from inside tdm-gcc). 我从这里下载了tdm-gcc(我确定我使用过的mingw32-make来自tdm-gcc)。 Following the instruction from wxWiki I executed (many attempts) this on powershell 按照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

But I keep getting the error 但我一直在收到错误

../../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_mswu\corelib_app.o' failed
mingw32-make: *** [gcc_mswu\corelib_app.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....

Insert 插入

#ifndef WINVER
    #define WINVER 0x0603
#endif

#ifndef _WIN32_WINNT
    #define _WIN32_WINNT 0x0603
#endif

#ifndef _WIN32_IE
    #define _WIN32_IE 0x0700
#endif

before 之前

#include <_mingw.h>

in include/wx/msw/gccpriv.h . include/wx/msw/gccpriv.h (This applies some of this GitHub pull request to wxWidgets 3.1.0 as distributed. The next wxWidgets release, whether 3.1.1 or 3.2.0, should resolve this issue.) (这将一些GitHub拉取请求应用于wxWidgets 3.1.0作为分布式。下一个wxWidgets版本,无论是3.1.1还是3.2.0,都应解决此问题。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM