« Return to Thread: Installation: setting environment variables

Re: Installation: setting environment variables

by Greg Chicares-2 :: Rate this Message:

Reply to Author | View in Thread

On 2007-09-30 18:30Z, Joel C. Salomon wrote:

> I've just installed MinGW (5.1.3) on a new computer, and am not
> remembering how to set the environment variables.
>
> Mingw is installed to c:\hacking\mingw, so I've set my %path% to
> ...;c:\hacking\mingw\bin;....  Programs are found -- gcc --version
> correctly tells me that 3.4.5 is installed -- but it can't complile,
> telling me that cc1 isn't found.  So I added
> C:\Hacking\MinGW\libexec\gcc\mingw32\3.4.5 to the %path% (which I
> don't remeber doing before!) and now gcc complains "randint.c:1:19: no
> include path in which to search for stdio.h".
>
> What environment variables do I need to set to make things work?

It should work without setting any environment variable.
You can even dispense with PATH:

C:\tmp>PATH ''

C:\tmp>PATH
PATH=''

C:\tmp>type hello.c
#include <stdio.h>

void hello()
{
   printf("hello, world!\n");
}

int main()
{
   hello();
   return 0;
}

C:\tmp>C:\MinGW-20060119\bin\gcc hello.c

C:\tmp>a
hello, world!

C:\tmp>C:\MinGW-20060119\bin\gcc -dumpversion
3.4.5


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

 « Return to Thread: Installation: setting environment variables