Compile of wxwidgets fails

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
gbbickerton
In need of some credit
In need of some credit
Posts: 4
Joined: Tue Aug 07, 2018 8:50 pm

Compile of wxwidgets fails

Post by gbbickerton »

I have followed the instructions at "Compiling wxWidgets with MinGW" and tried the troubleshooting suggestions but after about 5 to 10 minutes the compile fails with this message, which looks similar to the messages in the troubleshooting section but the suggested fixes have not worked.
(windows 10 4G ram AMD64) any suggestions what to try next ?

ar: gcc_mswu\corelibtreebkg.o: No such file or directory
makefile.gcc:5388: recipe for target '..\..\lib\gcc_lib\libwxmsw31u_core.a' failed
mingw32-make: *** [..\..\lib\gcc_lib\libwxmsw31u_core.a] Error 1

Thanks
User avatar
mill-j
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 02, 2018 3:21 pm

Re: Compile of wxwidgets fails

Post by mill-j »

Which version of wxwidgets are you trying to build? And which version of MinGW?

I'm also curious what command you used to try to build wx.

Thanks
[-X Don't Complain, Change It, It's Open-Source!
gbbickerton
In need of some credit
In need of some credit
Posts: 4
Joined: Tue Aug 07, 2018 8:50 pm

Re: Compile of wxwidgets fails

Post by gbbickerton »

I used the latest versions, wxwidgets 3.1.1 using MinGW x86_64-7.2.0-release-win32-seh-rt_v5-rev1
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Compile of wxwidgets fails

Post by ONEEYEMAN »

Hi,
And which command did you use to build the library?

Thank you.
gbbickerton
In need of some credit
In need of some credit
Posts: 4
Joined: Tue Aug 07, 2018 8:50 pm

Re: Compile of wxwidgets fails

Post by gbbickerton »

I have tried the "build the library" commands and troubleshooting a. and b. on this web page
I have also tried the "To fix issues when compiling static library with MONOLITHIC option".

https://wiki.wxwidgets.org/Compiling_wx ... with_MinGW

the error is of the type

"ar: gcc_mswu\monolib_dragigg.o: No such file or directory"

but with a different file name.

I am trying to use wxwidgets with code::blocks, I have tried precompiled libraries but I get an error message :-
"a matching release configuration cannot be found in the wxwidgets directory specified".
If you know of a straightforward way of getting wxwidgets working in code::blocks I will use it.
I am a beginner at C and would like to use this to learn C programming, I have used Delphi and Arduino so thought this would be an interesting way to do it.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Compile of wxwidgets fails

Post by ONEEYEMAN »

Hi,
So the error from your OP is produced from which command line?
Just copy and paste it in your response - this thread might help someone else.

Did you also tried to build the debug version of the library? The command is:

Code: Select all

mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug
Butg generally speaking you shouldn't start learning the language with the GUI framework. You should start with some basic stuff and then when you feel comfortable move on to the GUI.

Thank you.
gbbickerton
In need of some credit
In need of some credit
Posts: 4
Joined: Tue Aug 07, 2018 8:50 pm

Re: Compile of wxwidgets fails

Post by gbbickerton »

The error was much the same with each command line, but the file it failed on changed, so possibly running out of memory or a line to long issue.
I think I will give up on this, but thanks for your time.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Compile of wxwidgets fails

Post by ONEEYEMAN »

Hi,
Yes, the line is too long sounds very much like it.
You can try to download MSVC Community and compile/run there. It is also free for you. And it is not suffer from this issue.

Thank you.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Compile of wxwidgets fails

Post by PB »

I have built different wxWidgets versions in different configurations with different GCC-based toolchains on different PCs but I rarely if ever ran into this issue. I wonder what is the reason some people do and some do not...

FWIW, I just tested building wxWidgets master with the exact same parameters the OP did with this batch file

Code: Select all

set PATH=C:\Program Files\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
mingw32-make -f makefile.gcc BUILD=debug SHARED=1 UNICODE=1 COMPILER_PREFIX=gcc720_x64
pause
Please notice that BUILD=debug and UNICODE=1 are not actually needed, they are default build parameters.

Anyway, if the issue persists, there are two more options:
1. Download the pre-built binaries for your compiler.
2. Build wxWidgets with CMake.
Post Reply