User forums > Using Code::Blocks

Different compiler's paths are mixed together

(1/3) > >>

zetab:
I have 2 compilers setup in CodeBlocks, one is default "GNU GCC Compiler", another is "GNU GCC TDM-32 Compiler".

When I created a C console application project using "GNU GCC TDM-32 Compiler", added "echo %PATH%" command to pre-build step and build the project, I saw both compiler's toolchain path were both added to the PATH environment variable.

Is this behavior correct for CodeBlocks?

I'm using nightly build r13107 on win7 64bit.

BlueHazzard:
I have tested this on my local machine and can not reproduce it...
Are you sure they are not in your PATH variable and not added by codeblocks?
Are you sure that the project compiler and target compiler are the same and you are not mixing both compiler in the same project? (Check in the build options on the left when you select the project name and the different target names, that always the same compiler is selected)

zetab:
The compiler's path were added by codeblocks, not in my PATH variable.

Here is the PATH variable from cmd prompt outside codeblocks:

--- Code: ---D:\DevTools\CB_20221210_rev13107_win64>echo %PATH%
C:\Program Files\ImageMagick-7.0.9-Q16;C:\Program Files (x86)\Intel\iCLS Client\
;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\S
ystem32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\
Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Manage
ment Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engi
ne Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Compon
ents\IPT;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files
(x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\T
ools\Binn\;C:\Program Files\CMake\bin;C:\Program Files (x86)\Bakefile;C:\Program
 Files\NASM;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\AOMEI\AOMEI
Backupper 6.9.2;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\CVSNT\
--- End code ---

This is build log when I build the test project in codeblocks:

--- Code: ----------------- Build: Debug in test_path_tdm_gcc (compiler: GNU GCC TDM-32 Compiler)---------------

Running target pre-build steps
echo D:\DevTools\tdm-gcc-4.7.1\bin;D:\DevTools\tdm-gcc-4.7.1;D:\DevTools\mingw-w64-i686-12.2.0\mingw32\bin;D:\DevTools\mingw-w64-i686-12.2.0\mingw32;C:\Program Files\ImageMagick-7.0.9-Q16;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\CMake\bin;C:\Program Files (x86)\Bakefile;C:\Program Files\NASM;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\AOMEI\AOMEI Backupper 6.9.2;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\CVSNT
Execution of 'echo D:\DevTools\tdm-gcc-4.7.1\bin;D:\DevTools\tdm-gcc-4.7.1;D:\DevTools\mingw-w64-i686-12.2.0\mingw32\bin;D:\DevTools\mingw-w64-i686-12.2.0\mingw32;C:\Program Files\ImageMagick-7.0.9-Q16;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\CMake\bin;C:\Program Files (x86)\Bakefile;C:\Program Files\NASM;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\AOMEI\AOMEI Backupper 6.9.2;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\CVSNT' in 'D:\_temp\test_path_tdm_gcc' failed.

--- End code ---

"D:\DevTools\tdm-gcc-4.7.1" is the toolchain path of "GNU GCC TDM-32 Compiler".
"D:\DevTools\mingw-w64-i686-12.2.0\mingw32" is the toolchain path of "GNU GCC Compiler".

Another issue in the above build log is the execution of "echo %PATH%" cmd were failed. If I directly input the whole expanded echo cmd to cmd prompt, there's no error.

The project compiler and target compiler are the same. The project was created by project wizard, I only added the "echo %PATH%" cmd to pre-build step.

The attachment is my test project.

zetab:
I've tested this issue on my another win10 machine, and saw the same behavior.

BlueHazzard:
Thank you for reporting... Could you share your configuration file (found in %APPDATA%/Codeblocks/default.conf) and a minimal project file?

Navigation

[0] Message Index

[#] Next page

Go to full version