Code::Blocks Forums

User forums => Help => Topic started by: arew264 on July 09, 2007, 09:47:12 pm

Title: Windows Path Problem - Causing Issues?
Post by: arew264 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.
Title: Re: Windows Path Problem - Causing Issues?
Post by: maxx.t 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?
Title: Re: Windows Path Problem - Causing Issues?
Post by: arew264 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?
Title: Re: Windows Path Problem - Causing Issues?
Post by: TDragon 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.
Title: Re: Windows Path Problem - Causing Issues?
Post by: raph on July 10, 2007, 12:02:14 am
Did you log off/restart after you added gcc to PATH?
Title: Re: Windows Path Problem - Causing Issues?
Post by: arew264 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.
Title: Re: Windows Path Problem - Causing Issues?
Post by: maxx.t 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?