Author Topic: Windows Path Problem - Causing Issues?  (Read 2698 times)

Offline arew264

  • Multiple posting newcomer
  • *
  • Posts: 22
Windows Path Problem - Causing Issues?
« on: July 09, 2007, 09:47:12 pm »
I have been using CodeBlocks for a while on Windows, but I am having a problem (Windows, not CodeBlocks).

I'm trying to create a GUI project (been dreading this for a while), and I'm trying to to compile wxWidgets for use.
I'm following this: http://www.wxwidgets.org/wiki/index.php/CodeBlocks_Setup_Guide

The problem is that when I try to compile it with mingw32-make -f makefile.gcc, I get the error that gcc is an unrecognized command (Windows has this huge error mentioning bat files and whatnot).

I forget on what, but I had this problem before with a project that had one makefile building many makefiles. It would give an error there that mingw32-make was not a recognized command.

What the heck is going on here? I added "C:\MinGW\bin\" to the path variable in the environment variables configuration menu, and I can use the MinGW executables as commands, but other scripts can't seem to call them.
I must be missing something here.

maxx.t

  • Guest
Re: Windows Path Problem - Causing Issues?
« Reply #1 on: July 09, 2007, 10:25:59 pm »
What happens if you open a cmd shell, then set PATH=c:\MINGW\bin and then retry the make?

Offline arew264

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Windows Path Problem - Causing Issues?
« Reply #2 on: July 09, 2007, 11:56:44 pm »
When I do that, everything works.
I assume it will go back to the big long monstrosity it normally is when I reboot?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Windows Path Problem - Causing Issues?
« Reply #3 on: July 10, 2007, 12:01:23 am »
Yes, it would.

The problem may have been the trailing backslash, or a malformed PATH value. Make sure every individual path in your Windows PATH environment variable is separated by a semicolon ';', but that the list does not begin or end with a semicolon, and make sure that the entry for MinGW is "C:\MinGW\bin" (no trailing '\').

P.S. These instructions are for XP or 2000 where you set the PATH value from a dialog box; if you're using 95/98/ME where you set it in autoexec.bat, different procedure.
« Last Edit: July 10, 2007, 12:03:57 am by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Windows Path Problem - Causing Issues?
« Reply #4 on: July 10, 2007, 12:02:14 am »
Did you log off/restart after you added gcc to PATH?

Offline arew264

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Windows Path Problem - Causing Issues?
« Reply #5 on: July 10, 2007, 02:47:44 am »
Yes, I restarted after adding it to the path.
This is XP, and I have triple checked the list, so I'll try removing the trailing slash.

maxx.t

  • Guest
Re: Windows Path Problem - Causing Issues?
« Reply #6 on: July 10, 2007, 08:21:46 am »
I also have to set my PATH varaible to mingw\bin only before I can start a make of wxWidgets builds or samples. My guess is that some of my cygwin tools are messing up a make with full PATH variable set (including the cygwin bin directory). Maybe you have a similar problem?