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.
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:
PATH
suggests you have installed, and open 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
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.
This is how I managed to get it compiled using Command Prompt (console) and this Wiki guide :
PATH=C:\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin;C:\\wxWidgets-3.1.1\\include\\wx;%PATH%
cd c:\\wxWidgets-3.1.1\\build\\msw
mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=0
That extra SHELL=CMD.exe
saves me from running into some error codes. I still have problem with the Cygwin64 method. Will update.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.