无法建立新的wxWidgets.我该怎么办? [英] Can't build the new wxWidgets. What should i do?

查看:215
本文介绍了无法建立新的wxWidgets.我该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我感觉有些愚蠢,但是我无法构建新的wxWidgets. 我想使用Codelite + mingw + wxWidgets,所以我下载了最新版本:

I'm feeling a bit dumb, but i can't build the new wxWidgets. I want to use codelite + mingw + wxWidgets, so i download the latest releases:

CodeLite 9.1.3( http://downloads.codelite.org/downloads.php?windows_weekly_64 )

CodeLite 9.1.3 (http://downloads.codelite.org/downloads.php?windows_weekly_64)

安装程序让我下载TDM-GCC-64设置并进行安装.

The installer make me download the TDM-GCC-64 setup and install it.

然后我下载了wxWidgets-3.1.0(

Then i downloaded wxWidgets-3.1.0 (https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxMSW-3.1.0-Setup.exe)

Codelite检测到了编译器,现在我应该构建wxWidgets,但是我用Google搜索过的页面(wxW Wiki,Codelite文档等)是指不存在的文件夹和文件. 一切都安装在默认文件夹中,并且我不是PC的菜鸟,但也许对C ++ Builder等环境也很习惯.

Codelite detected the the compiler, now i should build the wxWidgets, but the pages i've googled for (wxW wiki, codelite docs, etc) refers to folders and files that does'nt exist. Everything is installed in the default folders, and i'm not a PC noob, while perhaps too used to environments like C++Builder etc.

我现在该怎么办?

更新

对不起,我不清楚.让我再试一次输出:

I'm sorry i'm not able to be clear. Let me try again with the output:

C:\wxWidgets-3.1.0\build\msw>mingw32-make -j8 -f Makefile.gcc SHARED=1 UNICODE=1 BUILD=release VENDOR=cl CXXFLAGS="-fno-keep-inline-dllexport -std=c++11" MONOLITHIC=1
if not exist gcc_mswudll mkdir gcc_mswudll
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
if not exist ..\..\lib\gcc_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\mswu\wx\setup.h
gcc -c -o gcc_mswudll\wxregex_regcomp.o  -O2 -mthreads  -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -D__WXMSW__  -D_UNICODE   -MTgcc_mswudll\wxregex_regcomp.o -MFgcc_mswudll\wxre
gex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
Impossibile trovare il percorso specificato.
        0 file copiati.
Makefile.gcc:5728: recipe for target '..\..\lib\gcc_dll\mswu\wx\setup.h' failed
mingw32-make: *** [..\..\lib\gcc_dll\mswu\wx\setup.h] Error 1
mingw32-make: *** Waiting for unfinished jobs....
In file included from ..\..\include/wx/defs.h:20:0,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
..\..\include/wx/platform.h:136:22: fatal error: wx/setup.h: No such file or directory
 #include "wx/setup.h"
                      ^
compilation terminated.
Makefile.gcc:5778: recipe for target 'gcc_mswudll\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswudll\wxregex_regcomp.o] Error 1

我可能错了,但在我看来这两行

I may be wrong, but seems to me that these two lines

if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
if not exist ..\..\lib\gcc_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\mswu\wx\setup.h

表明存在问题.

现在,我自己创建了目录,并复制了setup.h. 在我的家中,它还没有建立起来,但是我不记得为什么现在虽然在办公室里,它开始建立,但是到此结束了:

Now, i've made the directory myself and copied the setup.h in. At my home it was'nt still building, but i can't recall why, while right now, at office, it start building, but ended with this:

......
g++ -c -o gcc_mswudll\wxscintilla_LexCOBOL.o  -O2 -mthreads  -DHAVE_W32API_H -DNDEBUG -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LE
XER -DLINK_LEXERS -I..\..\lib\gcc_dll\mswu -I..\..\include  -D__WXMSW__   -D_UNICODE    -fno-keep-inline-dllexport -std=c++11 -MTgcc_mswudll\wxscintilla_LexCOBOL.o -MFgcc_mswudll\wxscintilla_LexCOBOL.
o.d -MD -MP ../../src/stc/scintilla/lexers/LexCOBOL.cxx
In file included from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\cmath:44:0,
                 from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:38,
                 from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\sviluppo\tools\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from ../../src/stc/scintilla/lexers/LexBibTeX.cxx:18:
c:\sviluppo\tools\mingw\include\math.h: In function 'float hypotf(float, float)':
c:\sviluppo\tools\mingw\include\math.h:635:30: error: '_hypot' was not declared in this scope
 { return (float)(_hypot (x, y)); }
                              ^
g++ -c -o gcc_mswudll\wxscintilla_LexCoffeeScript.o  -O2 -mthreads  -DHAVE_W32API_H -DNDEBUG -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ -
DSCI_LEXER -DLINK_LEXERS -I..\..\lib\gcc_dll\mswu -I..\..\include  -D__WXMSW__   -D_UNICODE    -fno-keep-inline-dllexport -std=c++11 -MTgcc_mswudll\wxscintilla_LexCoffeeScript.o -MFgcc_mswudll\wxscint
illa_LexCoffeeScript.o.d -MD -MP ../../src/stc/scintilla/lexers/LexCoffeeScript.cxx
Makefile.gcc:6183: recipe for target 'gcc_mswudll\wxscintilla_LexBibTeX.o' failed
mingw32-make: *** [gcc_mswudll\wxscintilla_LexBibTeX.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....

C:\wxWidgets-3.1.0\build\msw>

因此,我们仍然没有构建wxWidgets.

So, we're still not building the wxWidgets.

更新:

试图按照答案中的建议进行调试. 这是输出:

tried to make a debug build as suggested in the answer. this is the output:

C:\wxWidgets-3.1.0\build\msw> mingw32-make -j8 -f Makefile.gcc SHARED=1 UNICODE=
1 BUILD=debug VENDOR=cl CXXFLAGS="-fno-keep-inline-dllexport -std=c++11" MONOLIT
HIC=1
if not exist gcc_mswuddll mkdir gcc_mswuddll
if not exist ..\..\lib\gcc_dll\mswud mkdir ..\..\lib\gcc_dll\mswud
if not exist ..\..\lib\gcc_dll\mswud\wx\setup.h copy ..\..\include\wx\msw\setup.
h ..\..\lib\gcc_dll\mswud\wx\setup.h
gcc -c -o gcc_mswuddll\wxregex_regcomp.o -g -O0 -mthreads  -DHAVE_W32API_H -DNDE
BUG -I..\..\include -I..\..\lib\gcc_dll\mswud -D__WXMSW__  -D_UNICODE   -MTgcc_m
swuddll\wxregex_regcomp.o -MFgcc_mswuddll\wxregex_regcomp.o.d -MD -MP ../../src/
regex/regcomp.c
Impossibile trovare il percorso specificato.
        0 file copiati.
Makefile.gcc:5728: recipe for target '..\..\lib\gcc_dll\mswud\wx\setup.h' failed

mingw32-make: *** [..\..\lib\gcc_dll\mswud\wx\setup.h] Error 1
mingw32-make: *** Waiting for unfinished jobs....
In file included from ..\..\include/wx/defs.h:20:0,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
..\..\include/wx/platform.h:136:22: fatal error: wx/setup.h: No such file or dir
ectory
compilation terminated.
Makefile.gcc:5778: recipe for target 'gcc_mswuddll\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswuddll\wxregex_regcomp.o] Error 1

文件在那里,所以我不知道出了什么问题...

The file is there, so i don't know what's the problem...

C:\wxWidgets-3.1.0\build\msw>dir ..\..\src\regex\regcomp.*
 Il volume nell'unità C è 1TBWD-1-WIN7 64
 Numero di serie del volume: A26D-1E3B

 Directory di C:\wxWidgets-3.1.0\src\regex

28/02/2016  22:33            59.702 regcomp.c
               1 File         59.702 byte
               0 Directory  74.986.561.536 byte disponibili

C:\wxWidgets-3.1.0\build\msw>

推荐答案

安装程序让我下载TDM-GCC-64设置并进行安装.

The installer make me download the TDM-GCC-64 setup and install it.

CodeLite建议...

CodeLite suggests...

我现在该怎么办?

What should i do now?

像这样构建wxWidgets:

Build wxWidgets like this:

按照 CodeLite的Wiki页面上的描述构建wxWidgets

构建wxWidgets之后,您需要在CodeLite中从以下位置设置2个环境变量:(设置->环境变量):

After you have built wxWidgets, you need to set 2 environment variables in CodeLite from: (Settings->Environment variables):

WXCFG=gcc_dll\mswu WXWIN=\path\to\wxWidgets

WXCFG=gcc_dll\mswu WXWIN=\path\to\wxWidgets

如果您尝试在CodeLite中构建项目的Debug配置,则应执行以下操作中的 ONE :

If you attempt to build the Debug configuration of your project in CodeLite, you should do ONE of the following:

构建wxWidgets的debug版本(这是CodeLite将搜索的内容)

Build a debug version of wxWidgets (this is what CodeLite will search)

OR

从编译器和链接器选项中删除--debug标志:

Remove --debug flag from the compiler and linker options:

  1. 项目设置->编译器-> C ++编译器选项,然后删除显示--debug=yes或仅--debug
  2. 的部分
  3. 项目设置->链接器->链接器选项,并删除显示--debug=yes或仅--debug
  4. 的部分
  1. Project Settings->Compiler->C++ Compiler Options, and remove the part that says --debug=yes or just --debug
  2. Project Settings->Linker->Linker options, and remove the part that says --debug=yes or just --debug

更新CodeLite的Wiki页面链接

Update CodeLite's wiki page link

在答案中添加了PATH说明

Added PATH instructions to the answer

添加了有关如何设置环境变量WXCFG和WXWIN的说明

Added instructions on how to set the environment variables WXCFG and WXWIN

伊朗

这篇关于无法建立新的wxWidgets.我该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆