Joel asked
>
> 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 depends on the command being used for compiling.
For example, without setting any path or environment variable,
one can build some projects using a command such as the
following (the stuff below is all in one line):
x:\hacking\mingw\bin\mingw32-make.exe -f the_make_file
THE_DEFIN=its_val
CC="x:/hacking/MinGW/bin/gcc
-Ix:/hacking/MinGW/include
-Lx:/hacking/MinGW/lib"
Because of this message that you are seeing
> "randint.c:1:19: no include path in which to search for
> stdio.h".
I suspect you need to start by specifying the right include
path via. -I<path> (then you might start seeing linking errors
about not finding libraries -- try resolving that with -L<path>
and/or -l<value>).
--Suresh
-------------------------------------------------------------------------
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