Code::Blocks Forums
User forums => Help => Topic started by: markm on October 10, 2011, 12:57:55 pm
-
Hi all
I am still quite new to code::Blocks and C++ in general so please excuse my ignorance in some of this.
I Have just reinstalled code blocks in c:\codeblocks (i.e. on the root directory not in program files) on W7
(32 bit) but when I try to compile a simple "hello world" I get the following error
Linking console executable: bin\Debug\new.exe
mingw32-g++.exe: C:\programfiles\codeblocks\mingw: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
my windows path variables are set thus:
Path=C:\Program Files\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Windows Live\Shared;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\Autodesk\Backburner\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Universal Extractor;C:\Program Files\Universal Extractor\bin;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\cygwin\bin;c:\codeblocks\mingw
MINGWDIR=C:\codeblocks\mingw
global compiler settings in C::B is set to point to:
Toolchain executables: C:\CodeBlocks\MinGW (autodetect)
does anyone know why codeblocks is still trying to find the compiler in C:\programfiles\codeblocks
instead of C:\codeblocks
Is this something to do with a configuration file perhaps and how do I edit it
Regards Mark
-
Are you sure you're using the right compiler in you project/targets?
-
c:\cygwin\bin;c:\codeblocks\mingw
This is a very dangerous combination, btw.
Generally, make sure you select the right path for the right compiler. Maybe within your project you use a different compiler than you setup? Also, you can point to it directly not using auto-detect.
-
Hi All
Many thanks for your help. I have cured it but by a rather odd method. I set the build options in the project to
point to a compiler that isn't even installed on my system and as expected got a message that it didn't exist
then switched it back too GCC as before. and it compiled perfectly.
All very strange.
BTW a bit off topic but how should I uninstall the cygwin environment I agree that having it is a bit dangerous.
Regards Mark
-
BTW a bit off topic but how should I uninstall the cygwin environment I agree that having it is a bit dangerous.
You don't need to un-install Cygwin for this purpose, just remove both (!) compiler directories from the PATH environment variable -> accessible if you right click on "my computer" and select "properties", then search for environment variables.