-1

I am trying to compile wxWidgets using MinGW, and am having problems. I will ultimately be using MinGW from within Code::Blocks, but for now, I am simply compiling using the command line because that's what all the examples I see online do.

The problem is: I am able to compile many, many wxWidgets files, but there are two files whose name or directory get mangled somehow during compilation, even though they appear correctly in the build file, and the build comes to a halt.

Here are the error messages and why they're wrong:

g++: error: gcc_mswuddll\monodll_clpickercmn.o: No such file or directory   # the filename is missing an "r"; should be "monodll_clrpickercmn"
g++: error: gccmswuddll\monodll_xh_filectrl.o: No such file or directory    # the directory is missing an underscore; should be "gcc_mswuddll"

I have looked at many similar problems with compiling wxWidgets on Stack Overflow and in the wxWidgets help forums, but none addresses this particular issue.

The software versions I'm using are: gcc: 4.9.3 wxWidgets: 3.0.2 Code::Blocks: 16.01 (I'm not using Code::Blocks yet, but when I do, this will be the version I use)

In my attempts to fix this problem, I have uninstalled wxWidgets, reinstalled it, and tried recompiling. I got the exact same issues with the exact same files.

I made a batch file to compile wxWidgets, and listed all the steps that I followed to compile wxWidgets in the batch file. I did all those steps already. If there's something else I'm supposed to do to make wxWidgets compile, I don't know it yet. Here is that batch file.

echo off
cls
rem ----------------------------------------------------------------------------
rem                              Compile wxWidgets
rem ----------------------------------------------------------------------------
rem
rem   Edited by Colleen Kobe
rem   March 23, 2016
rem
rem   Description:  This batch file gives you directions to follow to download
rem                 and compile wxWidgets, gcc, and Code::Blocks.
rem
rem                 These directions work on the following software versions:
rem
rem                 gcc:           4.9.3
rem                 wxWidgets:     3.0.2
rem                 Code::Blocks  16.01
rem
rem                 Note:  I gathered the steps below from a number of
rem                 different web pages.  No page listed all these steps.
rem                 That leads me to believe that there are a lot of different
rem                 errors that can happen during these installations.  Many
rem                 of the "authorized" lists of instructions don't have these
rem                 errors.  Why?  Beats me.
rem
rem   Directions.   You must do the following tasks in order to compile
rem                 wxWidgets (and for this batch file to succeed).
rem
rem      Most of this advice comes from
rem      https://wiki.wxwidgets.org/Downloading_and_installing_wxWidgets and
rem      https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW.
rem
rem   1. Download MinGW.  See http://www.mingw.org/category/wiki/download.
rem      See the additional documentation in F:\Documents\wxWidgets about
rem      which options you'll need.  I installed mine into C:\MinGW, so any
rem      time I need to reference the MinGW directory, C:\MinGW's the
rem      directory I'll use.
rem
rem   2. Download wxWidgets.  See https://www.wxwidgets.org/downloads/.
rem      Install it into a directory whose name constains NO BLANKS.  I
rem      installed mine into F:\wxWidgets F:\Documents\wxWidgets about which
rem      options you'll need.  I installed mine into F:\wxWidgets, and so any
rem      time I need to reference the wxWidgets directory, F:\wxWidgets's the
rem      directory I'll use.
rem
rem   3. Download Code::Blocks.  See http://www.codeblocks.org/downloads/25.
rem
rem   4. Create an environment variable %WXWIN% and assign it the name of the
rem      directory into which you installed wxWidgets.  In my case, I'd assign
rem      it the value F:\wxWidgets.  See
rem      https://kb.wisc.edu/cae/page.php?id=24500 for directions on creating
rem      a system variable in Windows 7.
rem
rem   5. Append F:\wxWidgets and C:\MinGW\msys\1.0\bin to the system path.
rem      See http://stackoverflow.com/questions/23400030/windows-7-add-path
rem      for directions to change the path.
rem
rem   6. Still in the Control Panel:  Make sure your system path does NOT
rem      contain MSYS or CYGWIN directories.  Delete those directories from
rem      the path, if they're there.
rem
rem   7. Open %WXWIN%\build\msw\config.gcc.  Find the string (without the
rem      leading blanks):
rem
rem      CXXFLAGS
rem
rem      Change the line to read
rem
rem      CXXFLAGS += "-std=gnu++11"
rem
rem      Close config.gcc.
rem
rem   8. Open %WXWIN%\build\msw\makefile.gcc.  Find the string (without the
rem      leading blanks):
rem
rem      ar rcu $@ $(MONOLIB_OBJECTS)
rem
rem      There is only one line like it in the file.  Replace that string with
rem
rem      ~ar rcu $@ gcc_mswu\\monolib*.o
rem
rem      EXCEPT replace the tilde (~) with a tab character (ASCII 0x09), and
rem      the entire line should start in column 1.
rem
rem      Close makefile.gcc.
rem
rem   9. You are now ready to run this batch file to compile wxWidgets.
rem      First, be sure this batch file resides in %WXWIN%\build\msw.  If it
rem      doesn't, move it there.
rem
rem   10.  Open a cmd.exe shell (click the Start button and type, in the
rem      command box, cmd [Enter]. At the DOS command, type:
rem
rem      cd F:\wxWidgets\build\msw
rem      compilem
rem
rem      Cross your fingers.  Press the spacebar when prompted to.  Hope like
rem      crazy that it all passes.
rem
rem ----------------------------------------------------------------------------

echo on

set WXWIN=F:\wxWidgets
set origpath=%path%

F:
cd %WXWIN%\build\msw

rem ----------------------------------------------------------------------------
rem Clean up and build the debug version.  Start by deleting the old files.
rem ----------------------------------------------------------------------------

erase /q F:\wxWidgets\build\msw\gcc_mswu\*.*
erase /q F:\wxWidgets\build\msw\gcc_mswuddll\*.*
erase /q F:\wxWidgets\build\msw\gcc_mswudll\*.*

rem ----------------------------------------------------------------------------
rem The "-j4" compiler option means use this many threads to compile.  The
rem option works, but it makes debugging any error messages a little tricky.  So
rem remove the option during debugging, but add it back in later.
rem ----------------------------------------------------------------------------

rem mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1 MONOLITHIC=1 clean

mingw32-make SHELL=CMD.exe -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1 MONOLITHIC=1 clean
pause Debug File Clean complete.  Ready to compile.
cls

rem mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1 MONOLITHIC=1
    mingw32-make SHELL=CMD.exe     -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1 MONOLITHIC=1

rem ----------------------------------------------------------------------------
rem Clean up and build the release version. == wait to do this until the debug version works.
rem ----------------------------------------------------------------------------
rem     mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1 clean
rem rem mingw32-make SHELL=CMD.exe     -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1 clean
rem pause
rem cls
rem     mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1
rem mingw32-make SHELL=CMD.exe     -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1

rem ----------------------------------------------------------------------------
rem Have to do this copy manually--I don't know why.
rem ----------------------------------------------------------------------------

copy %WXWIN%\include\wx\msw\setup.h  %WXWIN%\include\wx

Line 130 in the batch file runs makefile.gcc. Here are selected lines from the makefile (I didn't want to display the entire 16,335 lines):

# =========================================================================
#     This makefile was generated by
#     Bakefile 0.2.9 (http://www.bakefile.org)
#     Do not modify, all changes will be overwritten!
# =========================================================================
include config.gcc
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
.
.
.
    $(OBJS)\monodll_xh_editlbox.o \
    $(OBJS)\monodll_xh_filectrl.o \
    $(OBJS)\monodll_xh_filepicker.o \
.
.
.
    $(OBJS)\monodll_clipcmn.o \
    $(OBJS)\monodll_clrpickercmn.o \
    $(OBJS)\monodll_colourcmn.o \
.
.
.
    $(OBJS)\monodll_clipcmn.o \
    $(OBJS)\monodll_clrpickercmn.o \
    $(OBJS)\monodll_colourcmn.o \
.
.
.
$(OBJS)\monodll_xh_editlbox.o: ../../src/xrc/xh_editlbox.cpp
    $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monodll_xh_filectrl.o: ../../src/xrc/xh_filectrl.cpp
    $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monodll_xh_filepicker.o: ../../src/xrc/xh_filepicker.cpp
    $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
.
.
.
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_clipcmn.o: ../../src/common/clipcmn.cpp
    $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_clrpickercmn.o: ../../src/common/clrpickercmn.cpp
    $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_colourcmn.o: ../../src/common/colourcmn.cpp
    $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
.
.
.

When running compilem, here are the last 68 lines of output. The show-stopping error messages occur on lines 33 and 34.

ll_xh_chckb.o gcc_mswuddll\monodll_xh_chckl.o gcc_mswuddll\monodll_xh_choic.o gcc_mswuddll\monodll_xh_choicbk.o gcc_mswu
ddll\monodll_xh_clrpicker.o gcc_mswuddll\monodll_xh_cmdlinkbn.o gcc_mswuddll\monodll_xh_collpane.o gcc_mswuddll\monodll_
xh_combo.o gcc_mswuddll\monodll_xh_comboctrl.o gcc_mswuddll\monodll_xh_datectrl.o gcc_mswuddll\monodll_xh_dirpicker.o gc
c_mswuddll\monodll_xh_dlg.o gcc_mswuddll\monodll_xh_editlbox.o gcc_mswuddll\monodll_xh_filectrl.o gcc_mswuddll\monodll_x
h_filepicker.o gcc_mswuddll\monodll_xh_fontpicker.o gcc_mswuddll\monodll_xh_frame.o gcc_mswuddll\monodll_xh_gauge.o gcc_
mswuddll\monodll_xh_gdctl.o gcc_mswuddll\monodll_xh_grid.o gcc_mswuddll\monodll_xh_html.o gcc_mswuddll\monodll_xh_hyperl
ink.o gcc_mswuddll\monodll_xh_listb.o gcc_mswuddll\monodll_xh_listbk.o gcc_mswuddll\monodll_xh_listc.o gcc_mswuddll\mono
dll_xh_mdi.o gcc_mswuddll\monodll_xh_menu.o gcc_mswuddll\monodll_xh_notbk.o gcc_mswuddll\monodll_xh_odcombo.o gcc_mswudd
ll\monodll_xh_panel.o gcc_mswuddll\monodll_xh_propdlg.o gcc_mswuddll\monodll_xh_radbt.o gcc_mswuddll\monodll_xh_radbx.o
gcc_mswuddll\monodll_xh_scrol.o gcc_mswuddll\monodll_xh_scwin.o gcc_mswuddll\monodll_xh_htmllbox.o gcc_mswuddll\monodll_
xh_simplebook.o gcc_mswuddll\monodll_xh_sizer.o gcc_mswuddll\monodll_xh_slidr.o gcc_mswuddll\monodll_xh_spin.o gcc_mswud
dll\monodll_xh_split.o gcc_mswuddll\monodll_xh_srchctrl.o gcc_mswuddll\monodll_xh_statbar.o gcc_mswuddll\monodll_xh_stbm
p.o gcc_mswuddll\monodll_xh_stbox.o gcc_mswuddll\monodll_xh_stlin.o gcc_mswuddll\monodll_xh_sttxt.o gcc_mswuddll\monodll
_xh_text.o gcc_mswuddll\monodll_xh_tglbtn.o gcc_mswuddll\monodll_xh_timectrl.o gcc_mswuddll\monodll_xh_toolb.o gcc_mswud
dll\monodll_xh_toolbk.o gcc_mswuddll\monodll_xh_tree.o gcc_mswuddll\monodll_xh_treebk.o gcc_mswuddll\monodll_xh_unkwn.o
gcc_mswuddll\monodll_xh_wizrd.o gcc_mswuddll\monodll_xmlres.o gcc_mswuddll\monodll_xmladv.o gcc_mswuddll\monodll_xmlrsal
l.o gcc_mswuddll\monodll_framemanager.o gcc_mswuddll\monodll_dockart.o gcc_mswuddll\monodll_floatpane.o gcc_mswuddll\mon
odll_auibook.o gcc_mswuddll\monodll_auibar.o gcc_mswuddll\monodll_tabmdi.o gcc_mswuddll\monodll_tabart.o gcc_mswuddll\mo
nodll_xh_auinotbk.o gcc_mswuddll\monodll_advprops.o gcc_mswuddll\monodll_editors.o gcc_mswuddll\monodll_manager.o gcc_ms
wuddll\monodll_property.o gcc_mswuddll\monodll_propgrid.o gcc_mswuddll\monodll_propgridiface.o gcc_mswuddll\monodll_prop
gridpagestate.o gcc_mswuddll\monodll_props.o gcc_mswuddll\monodll_art_internal.o gcc_mswuddll\monodll_art_msw.o gcc_mswu
ddll\monodll_art_aui.o gcc_mswuddll\monodll_bar.o gcc_mswuddll\monodll_ribbon_buttonbar.o gcc_mswuddll\monodll_ribbon_co
ntrol.o gcc_mswuddll\monodll_gallery.o gcc_mswuddll\monodll_page.o gcc_mswuddll\monodll_ribbon_panel.o gcc_mswuddll\mono
dll_ribbon_toolbar.o gcc_mswuddll\monodll_xh_ribbon.o gcc_mswuddll\monodll_richtextbuffer.o gcc_mswuddll\monodll_richtex
tctrl.o gcc_mswuddll\monodll_richtextformatdlg.o gcc_mswuddll\monodll_richtexthtml.o gcc_mswuddll\monodll_richtextimaged
lg.o gcc_mswuddll\monodll_richtextprint.o gcc_mswuddll\monodll_richtextstyledlg.o gcc_mswuddll\monodll_richtextstyles.o
gcc_mswuddll\monodll_richtextsymboldlg.o gcc_mswuddll\monodll_richtextxml.o gcc_mswuddll\monodll_xh_richtext.o gcc_mswud
dll\monodll_stc.o gcc_mswuddll\monodll_PlatWX.o gcc_mswuddll\monodll_ScintillaWX.o gcc_mswuddll\monodll_xml.o gcc_mswudd
ll\monodll_xtixml.o gcc_mswuddll\monodll_version_rc.o  -g -mthreads -L..\..\lib\gcc_dll -Wl,--out-implib=..\..\lib\gcc_d
ll\libwxmsw30ud.a    -lwxtiffd -lwxjpegd -lwxpngd   -lwxzlibd -lwxregexud -lwxexpatd    -lkernel32 -luser32 -lgdi32 -lco
mdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet     ..\
..\lib\gcc_dll\libwxscintillad.a
g++: error: gcc_mswuddll\monodll_clpickercmn.o: No such file or directory
g++: error: gccmswuddll\monodll_xh_filectrl.o: No such file or directory
makefile.gcc:5206: recipe for target '..\..\lib\gcc_dll\wxmsw30ud_gcc_custom.dll' failed
mingw32-make: *** [..\..\lib\gcc_dll\wxmsw30ud_gcc_custom.dll] Error 1

F:\wxWidgets\build\msw>rem ----------------------------------------------------------------------------

F:\wxWidgets\build\msw>rem Clean up and build the release version. == wait to do this until the debug version works.

F:\wxWidgets\build\msw>rem ----------------------------------------------------------------------------

F:\wxWidgets\build\msw>rem     mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHI
C=1 clean

F:\wxWidgets\build\msw>rem rem mingw32-make SHELL=CMD.exe     -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHI
C=1 clean

F:\wxWidgets\build\msw>rem pause

F:\wxWidgets\build\msw>rem cls

F:\wxWidgets\build\msw>rem     mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHI
C=1

F:\wxWidgets\build\msw>rem mingw32-make SHELL=CMD.exe     -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1


F:\wxWidgets\build\msw>rem ----------------------------------------------------------------------------

F:\wxWidgets\build\msw>rem Have to do this copy manually--I don't know why.

F:\wxWidgets\build\msw>rem ----------------------------------------------------------------------------

F:\wxWidgets\build\msw>copy F:\wxWidgets\include\wx\msw\setup.h  F:\wxWidgets\include\wx
        1 file(s) copied.
F:\wxWidgets\build\msw>

For your information:

  • F:\wxWidgets\build\msw\gcc_mswuddll\monodll_clrpickercmn.o does exist.
  • F:\wxWidgets\build\msw\gcc_mswuddll\monodll_clrpickercmn.o.d does exist.

  • F:\wxWidgets\build\msw\gcc_mswuddll\monodll_xh_filectrl.o.d does exist.

  • F:\wxWidgets\build\msw\gcc_mswuddll\monodll_xh_filectrl.o does exist.

Out of all those files getting compiled, why are those two files, and JUST those two files, getting garbled? What's so special about them?

  • Neither is the longest file name; \webviewdll_webviewarchivehandler.o is longest.
  • Neither is the shortest file name; \wxpng_png.o is shorter.

https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW addresses the issue "No such file or directory," but I already implemented their suggestion with changing the MONOLIB_OBJECTS line, and I'm still getting this error.

Where do I go from here? How do I fix this? Suggestions?

  • Uff, you posted a huge amount of code and saple data! Please check out this help topic: [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)... – aschipfl Mar 23 '16 at 20:09
  • Of course I did. It saves time. This way, no one can tell me I did not submit enough information, or ask for clarification. Also, this is not a run-of-the-mill problem. I have never heard of a compiler or linker dropping characters out of a file or directory name. I thought any relevant information I could provide now, would be beneficial. – Colleen Kobe Mar 23 '16 at 20:16
  • Can you show us the part of the command that generates the error that actually includes the mangled filenames? Also show us the bit of makefile that actually runs that command. – Etan Reisner Mar 23 '16 at 20:16
  • Except you also left out large parts of relevant information. Like what variable those initial file lists are being assigned into. The full command being run that generates the error. – Etan Reisner Mar 23 '16 at 20:18
  • @EtanReisner--the lines in the makefile that produces the mangled file names appear in the 3rd listing above. Here are the lines: $(OBJS)\monodll_xh_filectrl.o: ../../src/xrc/xh_filectrl.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< ifeq ($(USE_GUI),1) $(OBJS)\monodll_clrpickercmn.o: ../../src/common/clrpickercmn.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< endif – Colleen Kobe Mar 23 '16 at 20:31
  • @EtanReisner--At least, I ASSUME those are the lines that generate the problems. The only other times the file names appear in the makefile.gcc are as part of a list of *.o files; they aren't being compiled individually. As to which lines in the makefile run that command--I don't know. I don't understand how this makefile works. I selected the lines in the makefile where these file names appeared, and copied a few lines before and after them so they'd appear more in context. The lines appear in the third listing above. Other than that, I have no idea where to look. – Colleen Kobe Mar 23 '16 at 20:32
  • What do I need to look for to give you the information you need? – Colleen Kobe Mar 23 '16 at 20:33
  • Please, remove all the rem statements, they make something so much harder to read and do nothing... – Dennis van Gils Mar 23 '16 at 20:39
  • @DennisvanGils --here is the make file with all rem statements removed. echo off cls echo on set WXWIN=F:\wxWidgets set origpath=%path% F: cd %WXWIN%\build\msw erase /q F:\wxWidgets\build\msw\gcc_mswu\*.* erase /q F:\wxWidgets\build\msw\gcc_mswuddll\*.* erase /q F:\wxWidgets\build\msw\gcc_mswudll\*.* mingw32-make SHELL=CMD.exe -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1 MONOLITHIC=1 clean cls mingw32-make SHELL=CMD.exe -f makefile.gcc BUILD=debug UNICODE=1 SHARED=1 MONOLITHIC=1 copy %WXWIN%\include\wx\msw\setup.h %WXWIN%\include\wx – Colleen Kobe Mar 23 '16 at 20:51
  • I mean edit the question, not comment it... – Dennis van Gils Mar 23 '16 at 21:00
  • I indented four spaces and appended two blanks at the end of each line in the code block of my previous post, but it still got all concatenated. What did I do wrong? – Colleen Kobe Mar 23 '16 at 21:01
  • Clean up the build, remove **SHELL=CMD.exe** and try again. I once copied and past some blog/whatever site build param and by removing that helped, I also ask more or less the same question in wxWidgets forum, see [here](https://forums.wxwidgets.org/viewtopic.php?f=19&t=41197) if you'd like to see responds on the topic.. I use gcc 4.9.2 (from Strawberry perl) and I have no problems :) – Joel Mar 23 '16 at 23:35
  • @Joel--could you please repost your comment as an answer? It worked! But I don't think I can give you credit unless you post as an answer. – Colleen Kobe Mar 24 '16 at 16:22

3 Answers3

0

My hypothesis is that it's somehow related to Windows command line length limitations (4096 characters, I believe, although this could depend on Windows version). Unfortunately I don't know what to do about it, all I can suggest is a simple workaround which is just to not use MONOLITHIC=1 make argument to build default, multiple libraries instead of a single huge one.

On an unrelated note, your batch file has several questionable/wrong steps:

  1. You don't need to edit config.gcc just for this, you could simply pass CXXFLAGS=-std=gnu++11 on make command line.
  2. You shouldn't have to replace ar $(MONOLIB_OBJECTS) line, I have no idea why do you want to do it.
  3. You really shouldn't copy wx/msw/setup.h to wx/setup.h, this is not the same file. The correct wx/setup.h is under the build directory (lib/gcc_dll in your case) and you must set up the include paths to include this directory when compiling your code.
VZ.
  • 21,740
  • 3
  • 39
  • 42
  • Thank you for your comments. I visited at least a couple of dozen web pages trying to get wxWidgets to compile. Some of them had useful suggestions. Often the advice on two or more pages would contradict each other. It's so hard for a newbie to know what advice to trust! I will definitely remove the "copy setup.h" command from my batch file. Thanks again for your comments. – Colleen Kobe Mar 24 '16 at 15:59
0

Joel, above, actually answered my question and provided a solution to my problem. He said to remove the SHELL=CMD.exe option in the build statement.In addition, I re-examined my system path, and I found I did have a directory with MSYS in it. I deleted that directory from the path. I don't know why doing those things worked, but they did.

I would love to give Joel credit for this solution, but I don't know how to mark a comment as the answer. Is there a way to do that?

0

I have found an original solution to this particular problem with compiling wxWidgets on Windows 7 (Will as well work on XP and later version of Windows)

  1. Run building script several times until you always get the same exact error trying to build the Core library. (Cannot find vlbo.o, or something like this)

  2. Move entire wxWidget directory contents to another directory having a 1-letter name, like D:\w

  3. Make a batch file containing something like this:

    cmd.exe %1

    echo %1>>output.txt

  4. Put the path and name of this file instead of cmd.exe into the building script and run it. It will execute incoming commands and log everything to the output.txt and you will be able to perform this:

  5. Rename the folder gcc_mswu to a short name like z or something. Batch replace this substring in the text file. This will give you a line that is shorter than 8192 symbols at least this is correct for wxWidgets v. 3.1

  6. Copy the entire command to a copy of your building script, replacing the mingw32-make with it. Run it. Enjoy the completely built library.

Probably it's also possible to place all command-line parameters in a file and run ar<cmdparams.txt.