I added the path to my PATH variable. But still the same issue.
I call the cc1.exe file from my home directory, and it gives the following:
C:\Documents and Settings\Thomas>cc1.exe -v
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/lib/gcc/mingw32/3.4.4/include"
ignoring nonexistent directory "/mingw/mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
End of search list.
That tells me the path is setup correctly to cc1.exe but I'm missing something else. What is in these directories? How come they are not intalled?
Thanks,
Thomas
What is output of this two commands?
gcc --verbose
gcc -print-search-dirs
@mispunt: I couldn't find these directories on my harddrive. I wonder why they are not there.
@Profic:
Here the output of the 2 commands you aseked for:
C:\wxWidgets-2.6.1\build\msw>gcc --verbose
Using built-in specs.
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-ja
va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchroniz
ation --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.4 (mingw special)
C:\wxWidgets-2.6.1\build\msw>gcc -print-search-dirs
install: /mingw/lib/gcc/mingw32/3.4.4/
programs: =../libexec/gcc/mingw32/3.4.4/;../libexec/gcc/;/mingw/libexec/gcc/ming
w32/3.4.4/;/mingw/libexec/gcc/mingw32/3.4.4/;/mingw/libexec/gcc/mingw32/;/mingw/
lib/gcc/mingw32/3.4.4/;/mingw/lib/gcc/mingw32/;/usr/libexec/gcc/mingw32/3.4.4/;/
usr/libexec/gcc/mingw32/;/usr/lib/gcc/mingw32/3.4.4/;/usr/lib/gcc/mingw32/;../mi
ngw32/bin/mingw32/3.4.4/;../mingw32/bin/;/mingw/mingw32/bin/mingw32/3.4.4/;/ming
w/mingw32/bin/
libraries: =../lib/gcc/mingw32/3.4.4/;../lib/gcc/;/mingw/lib/gcc/mingw32/3.4.4/;
/usr/lib/gcc/mingw32/3.4.4/;../mingw32/lib/mingw32/3.4.4/;../mingw32/lib/;/mingw
/mingw32/lib/mingw32/3.4.4/;/mingw/mingw32/lib/;/mingw/lib/mingw32/3.4.4/;/mingw
/lib/;../lib/mingw32/3.4.4/;../lib/;/mingw/lib/mingw32/3.4.4/;/mingw/lib/;/lib/m
ingw32/3.4.4/;/lib/;/usr/lib/mingw32/3.4.4/;/usr/lib/
Thanks,
Thomas
There is my output:
E:\work\web\SDN\recipe-nddocs\cpp>gcc --verbose
Reading specs from c:/devel/mingw/bin/../lib/gcc/mingw32/3.4.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw
--enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --ena
ble-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
E:\work\web\SDN\recipe-nddocs\cpp>gcc -print-search-dirs
install: /mingw/lib/gcc/mingw32/3.4.2/
programs: =c:/devel/mingw/bin/../libexec/gcc/mingw32/3.4.2/;c:/devel/mingw/bin/../libexec/gcc/;/mingw/libexec/gcc/mingw3
2/3.4.2/;/mingw/libexec/gcc/mingw32/3.4.2/;/mingw/libexec/gcc/mingw32/;/mingw/lib/gcc/mingw32/3.4.2/;/mingw/lib/gcc/ming
w32/;/usr/libexec/gcc/mingw32/3.4.2/;/usr/libexec/gcc/mingw32/;/usr/lib/gcc/mingw32/3.4.2/;/usr/lib/gcc/mingw32/;c:/deve
l/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/bin/mingw32/3.4.2/;c:/devel/mingw/bin/../lib/gcc/mingw32/3.4.2/
../../../../mingw32/bin/;/mingw/mingw32/bin/mingw32/3.4.2/;/mingw/mingw32/bin/
libraries: =c:/devel/mingw/bin/../lib/gcc/mingw32/3.4.2/;c:/devel/mingw/bin/../lib/gcc/;/mingw/lib/gcc/mingw32/3.4.2/;/u
sr/lib/gcc/mingw32/3.4.2/;c:/devel/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/lib/mingw32/3.4.2/;c:/devel/mi
ngw/bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/lib/;/mingw/mingw32/lib/mingw32/3.4.2/;/mingw/mingw32/lib/;/mingw/l
ib/mingw32/3.4.2/;/mingw/lib/;c:/devel/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../mingw32/3.4.2/;c:/devel/mingw/bin/../
lib/gcc/mingw32/3.4.2/../../../;/mingw/lib/mingw32/3.4.2/;/mingw/lib/;/lib/mingw32/3.4.2/;/lib/;/usr/lib/mingw32/3.4.2/;
/usr/lib/
E:\work\web\SDN\recipe-nddocs\cpp>
Strage things are: use of internal specs and use of releative paths in search dirs.
However specs is not really needed. At least cc1 will be called w/out them.
But paths seems to be relevant.
Do you have C:\Program Files\CodeBlocks\libexec\gcc\mingw32\3.4.4, C:\Program Files\CodeBlocks\lib\gcc\mingw32\3.4.4 and C:\Program Files\CodeBlocks\include\c++\3.4.4 directories?
It looks like gcc looks in your path for the bin directory where it resides and then uses relative paths from there to find programs and libraries. The only codeblocks or mingw stuff in my path is
C:\MinGW\bin
and gcc -print-search-dirs:
install: /mingw/lib/gcc/mingw32/3.4.4/
programs: =C:/MinGW/bin/../libexec/gcc/mingw32/3.4.4/;C:/MinGW/bin/../libexec/gc
c/;/mingw/libexec/gcc/mingw32/3.4.4/;/mingw/libexec/gcc/mingw32/3.4.4/;/mingw/li
bexec/gcc/mingw32/;/mingw/lib/gcc/mingw32/3.4.4/;/mingw/lib/gcc/mingw32/;/usr/li
bexec/gcc/mingw32/3.4.4/;/usr/libexec/gcc/mingw32/;/usr/lib/gcc/mingw32/3.4.4/;/
usr/lib/gcc/mingw32/;C:/MinGW/bin/../lib/gcc/mingw32/3.4.4/../../../../mingw32/b
in/mingw32/3.4.4/;C:/MinGW/bin/../lib/gcc/mingw32/3.4.4/../../../../mingw32/bin/
;/mingw/lib/gcc/mingw32/3.4.4/../../../../mingw32/bin/mingw32/3.4.4/;/mingw/lib/
gcc/mingw32/3.4.4/../../../../mingw32/bin/
libraries: =C:/MinGW/bin/../lib/gcc/mingw32/3.4.4/;C:/MinGW/bin/../lib/gcc/;/min
gw/lib/gcc/mingw32/3.4.4/;/usr/lib/gcc/mingw32/3.4.4/;C:/MinGW/bin/../lib/gcc/mi
ngw32/3.4.4/../../../../mingw32/lib/mingw32/3.4.4/;C:/MinGW/bin/../lib/gcc/mingw
32/3.4.4/../../../../mingw32/lib/;/mingw/lib/gcc/mingw32/3.4.4/../../../../mingw
32/lib/mingw32/3.4.4/;/mingw/lib/gcc/mingw32/3.4.4/../../../../mingw32/lib/;/min
gw/lib/mingw32/3.4.4/;/mingw/lib/;C:/MinGW/bin/../lib/gcc/mingw32/3.4.4/../../..
/mingw32/3.4.4/;C:/MinGW/bin/../lib/gcc/mingw32/3.4.4/../../../;/mingw/lib/gcc/m
ingw32/3.4.4/../../../mingw32/3.4.4/;/mingw/lib/gcc/mingw32/3.4.4/../../../;/lib
/mingw32/3.4.4/;/lib/;/usr/lib/mingw32/3.4.4/;/usr/lib/
Seems I understand what is going here.
Make sure gcc.exe is not somewhere else in your %path% except C:\Program Files\CodeBlocks\bin
The only way I can get this error is to copy single gcc.exe to some directory and call it from there.
If there is none try to do the following as last resort:
echo int main() { return 0; } > dummy.c
gcc --verbose -o dummy dummy.c
and show full output. But I don't think this will be helpfull, but who knows...
Do you have cygwin on your computer? In that case, it may be that you are actually invoking the wrong make. I once had that, took me three days to find out. This produces the exact same error message.
Apart from that, I always deem it a good idea to have MinGW installed in C:\mingw. Keep everything as simple and clear as possible (it gets complicated on its own).
One installation, and only one. No complicated pathnames, no ambiguous stuff.
Then, before you call make, you should type:set path=C:\mingw;C:\mingw\mingw32
so there are no questions about your path, either. wxWidgets is still a hideous beast, and it can still fail to compile, but it is less likely if you have eliminated all the obvious troublemakers.
...Then, before you call make, you should type:set path=C:\mingw;C:\mingw\mingw32
...
sorry but i think this isn't correct: if "C:\MinGW" is the install directory, then
it should read more like set path=C:\MinGW\bin;%PATH%
that is what i do with a patchfile called "envgcc.bat" (set environment for gcc)
and works perfectly since years. actually i use MinGW gcc 3.4.4, make 3.8.0
@tiwag
could you post your "envgcc.bat" file
@REM start-----------------------------------------------------------envgcc.bat
@if "%ENVGCC%" == "" (
set ENVGCC=SET
echo Setting environment for MinGW GCC Compiler...
set PATH=D:\MinGW\Bin;%PATH%
)
@REM end-------------------------------------------------------------envgcc.bat