7

I am trying to compile wxwidgets. I am compiling with mingw32 and am following the install.txt that came with the zip file, but when ever I compile it, it gives me these errors.

if not exist gcc_mswd mkdir gcc_mswd
process_begin: CreateProcess(NULL, -c "if not exist gcc_mswd mkdir gcc_mswd", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: [gcc_mswd] Error 2 (ignored)
if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib
process_begin: CreateProcess(NULL, -c "if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [..\..\lib\gcc_lib] Error 2

Any help is appreciated.

PS: I am using mingw32-make if that makes a difference.

eriktous
  • 6,569
  • 2
  • 25
  • 35

5 Answers5

5

According to the guide on the wxWiki it looks like the error is caused because you have MSYS in your PATH environment variable and that confuses everything. It suggests either compiling with MSYS or removing it from PATH and ensuring that your mingw installation path is in PATH.

SteveL
  • 1,811
  • 1
  • 13
  • 23
4

what i also found was that other stuff in my PATH ended with /BIN. so mingw could not find it's components. what i did was removed everything else from my PATH ( and broke lots of stuff i will fix later - i have my PATH backed up :) ). solves that problem. what you could also try is to place mingw path first in your PATH, so it doesn't look any further - i haven't tried it though.

peter
  • 41
  • 2
  • The problem is not having several `bin` parts in `PATH` or not, but that multiple tools with the same name can conflict. As to check for all accessible versions of `gcc` run `where gcc`. – Wolf Jan 24 '18 at 12:41
  • Don't edit your system `PATH` variable permanently, instead set up a batch file that sets the `PATH` to the minimum required, and add the rest of your actual command line(s). Run this batch by double-clicking or from command line via `start` to start a new shell. The changes to the environment (including `PATH`) are only visible to this shell and will be discarded when closing it. – Wolf Jan 24 '18 at 12:47
3

Do you also have MSYS installed? If so, try the MSYS version of make; mingw32-make is known to be flawed in some respects. (This is just a suggestion; I don't know if it will actually solve this particular problem.)

eriktous
  • 6,569
  • 2
  • 25
  • 35
3

I had mksnt (another *nix-like shell) on my PATH and observed the same trouble. Removed it from PATH and MinGW is building wxWidgets 2.8.12 now.

Moon
  • 31
  • 1
1

Thanks for the previous answers. I had the same problem that was caused by having Git-Bash in PATH variable: C:\Program Files (x86)\Git\bin; After removing it from the PATH everything worked

Gustav-Gans
  • 365
  • 1
  • 3
  • 13