无法在命令提示符下使用GCC构建WxWidgets [英] Failed to build WxWidgets with GCC in command prompt
问题描述
我正在遵循
有人可以告诉我这是什么问题吗?我确实尝试使用Cygwin进行构建,但是在尝试以下行时遇到错误:
../configure --enable-debug
它抱怨:
-bash:../configure:没有这样的文件或目录
我现在精疲力尽,无法弄清楚如何完成它.有人帮忙.
这是PATH在命令提示符下显示的内容:
=========================================
好的,我尝试了一些新的东西.
- 使用Cygwin64终端:
-
cd/cygdrive/C/wxWidgets-3.1.1/build-debug
-
../configure --enable-debug
-
make
-
然后,我尝试了:
-
cd样本/最小
-
make
我遇到此错误:
<代码> g ++ -o minimal.exe minimal_sample_rc.o minimal_minimal.o -L/cygdrive/C/wxWidgets-3.1.1/build-debug/lib -mwindows -lwx_mswu_core-3.1 -lwx_baseu-3.1 -lwxtiff-3.1-lwxjpeg-3.1 -lwxpng-3.1 -lwxzlib-3.1 -lwxregexu-3.1 -lwxexpat-3.1 -lrpcrt4 -loleaut32 -lole32 -luuid -luxtheme -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi-loleacc -lkernel32 -luser32 -lrpcrt4 -loleaut32 -lole32 -luuid -luxtheme -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lwsock32 -lgdi32 -loleacc -lkernel32 -luser32/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld:找不到-lwx_mswu_core-3.1/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld:找不到-lwx_baseu-3.1/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld:找不到-lwxtiff-3.1/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld:找不到-lwxjpeg-3.1/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld:找不到-lwxpng-3.1/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld:找不到-lwxzlib-3.1/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld:找不到-lwxregexu-3.1/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld:找不到-lwxexpat-3.1collect2:错误:ld返回1退出状态make:*** [Makefile:149:minimal.exe]错误1
有人可以告诉我为什么我的Cygwin64构建失败吗?
您可以通过几种简单的方法进行尝试:
- 使用VS 2014,其中
PATH
建议您已安装并打开c:\ wxWidgets-3.1.1 \ build \ msw \ wx_vc14.sln
;
OR
- 打开控制台并执行
-
PATH = C:\ mingw-w64 \ x86_64-8.1.0-posix-seh-rt_v6-rev0 \ mingw64 \ bin;%PATH%
-
cd c:\ wxWidgets-3.1.1 \ build \ msw
-
mingw32-make.exe -f makefile.gcc
-
OR
您从哪里确切地运行configure?您需要位于 c:\ wxWidgets-3.1.1
下的新子文件夹中.在该子文件夹中运行 ../configure
,请参见 c:\ wxWidgets-3.1.1 \ configure
文件.
I am following the official instructions to build WxWidgets with GCC. For some reason, it fails to build and gives me this error:
Could someone tell me what is the problem here? I did try to use Cygwin to build, but encountered error when trying this line:
../configure --enable-debug
It complained:
-bash: ../configure: No such file or directory
I am at the end of my wits now, and cannot figure out how to get it done. Someone please help.
This is what PATH shows up in commmand prompt:
===========================================
OK, I tried something new.
- Using Cygwin64 terminal:
cd /cygdrive/C/wxWidgets-3.1.1/build-debug
../configure --enable-debug
make
Afterwards, I tried:
cd samples/minimal
make
And I encountered this error:
g++ -o minimal.exe minimal_sample_rc.o minimal_minimal.o -L/cygdrive/C/wxWidgets-3.1.1/build-debug/lib -mwindows -lwx_mswu_core-3.1 -lwx_baseu-3.1 -lwxtiff-3.1 -lwxjpeg-3.1 -lwxpng-3.1 -lwxzlib-3.1 -lwxregexu-3.1 -lwxexpat-3.1 -lrpcrt4 -loleaut32 -lole32 -luuid -luxtheme -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lwsock32 -lgdi32 -loleacc -lkernel32 -luser32 -lrpcrt4 -loleaut32 -lole32 -luuid -luxtheme -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lwsock32 -lgdi32 -loleacc -lkernel32 -luser32
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lwx_mswu_core-3.1
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lwx_baseu-3.1
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lwxtiff-3.1
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lwxjpeg-3.1
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lwxpng-3.1
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lwxzlib-3.1
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lwxregexu-3.1
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lwxexpat-3.1
collect2: error: ld returned 1 exit status
make: *** [Makefile:149: minimal.exe] Error 1
Can someone tell me why my Cygwin64 build failed?
You have several simple ways to try:
- Use VS 2014 which
PATH
suggests you have installed, and openc:\wxWidgets-3.1.1\build\msw\wx_vc14.sln
;
OR
- Open a console and do
PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
cd c:\wxWidgets-3.1.1\build\msw
mingw32-make.exe -f makefile.gcc
OR
Where exactly did you run configure from? You need to be in a new subfolder below c:\wxWidgets-3.1.1
. From that subfolder you run ../configure
, see c:\wxWidgets-3.1.1\configure
file.
这篇关于无法在命令提示符下使用GCC构建WxWidgets的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!