The message is "Execution of 'mingw32-g++.exe -Wall ..... failed"
It happens only for old workspaces created with a previous C:B version. Sorry, not small one at hand.
I can say that if I open a "modern" workspace and hit "compile", close it, open the not-working workspace and hit "compile" then it does work. It only fails if the offending workspace is the first loaded after CB init.
I don't remember if it happen also in 16.01. Likely not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have not installed MinGW. Only TDM-GCC 32/64 versions on different folders. Screenshots attached.
The default 'GNU GCC Compiler' at "Selected compiler" is exactly the same as 'GNU GCC Compiler TDM 64b'
The issue comes from having two compilers for the same project. In my case both 32/64 versions of TDM-GCC, installed in different folders. Fresh C::B detects the 64 bits version.
Steps:
1) (optional) Remove %users%\YOURUSER\AppData\Roaming\Codeblocks folder, just to simulate a fresh nighty install
2) Open C::B 11552
3) Press OK on compiler detection, no need to select one.
4) Same for "file associations".
5) Create a "Empty project" in any folder, accept rest of options.
6) Add any .cpp with main().
7) Build->Compile current file works fine. Build and run works fine.
8) Settings->Compiler and use "Copy" button.
9) Adjust Compiler's installation directory and Toolchain executables.
i.e. C::B detected TDM-GCC-64. For second compiler (TDM-GCC-32) I changed x86_64-w64-mingw32-g++.exe to mingw32-g++.exe and so on for "C compiler", "C++ Compiler" and "Linker for dynamic libs"
Close the dialog with OK.
10) Project -> Build Options... change the compiler for "Debug", now to be the second created (copy of GNU GCC compiler).
11) In the "build target" combobox select "Debug".
12) Make a small change in the code so as to get it "invalidated" and need a new compilation.
13) Build->Compile current file fails.
14) If you first build this debug target, then using "Compile current file" works.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Do you have minimal sample project or at least show us the build log.
Does it happen with the previous nightly? 16.01?
The message is "Execution of 'mingw32-g++.exe -Wall ..... failed"
It happens only for old workspaces created with a previous C:B version. Sorry, not small one at hand.
I can say that if I open a "modern" workspace and hit "compile", close it, open the not-working workspace and hit "compile" then it does work. It only fails if the offending workspace is the first loaded after CB init.
I don't remember if it happen also in 16.01. Likely not.
Why don't you just install 16.01 and try with it? Or the previous nightly? You can have them side by side.
And please paste the log form the build log tab. Details matter!
The format of cbp or workspace files hasn't change for quite a long time!
16.01 does not work neihter.
When I hit "Compile current file", not "Build" (remember: building first makes this issue disappear)
-------------- Build file: debug32 in deficar proyecto (compiler: GNU GCC Compiler TDM 32b)---------------
mingw32-g++.exe -Wall -std=c++11 -pipe -mthreads -DGNUWIN32 -DWXMSW -D_UNICODE -pg -g -DWXDEBUG -m32 -IF:\wxSVN\include -Icodigo -IF:\wxSVN\lib\gcc_lib32\mswud -c F:\PROGS\deficar\codigo\importpoints.cpp -o debug32\objs\codigo\importpoints.cpp.o
Execution of 'mingw32-g++.exe -Wall -std=c++11 -pipe -mthreads -DGNUWIN32 -DWXMSW -D_UNICODE -pg -g -DWXDEBUG -m32 -IF:\wxSVN\include -Icodigo -IF:\wxSVN\lib\gcc_lib32\mswud -c F:\PROGS\deficar\codigo\importpoints.cpp -o debug32\objs\codigo\importpoints.cpp.o' in 'F:\PROGS\deficar' failed.
If I change the target to release64 (my name for using TDM-GCC 64) then it works.Back again to TDM-GCC32 (without exiting CB) it doesn't.
Can you post the paths where every compiler is on your file system?
What is the content of your PATH environement variable?
I have not installed MinGW. Only TDM-GCC 32/64 versions on different folders. Screenshots attached.
The default 'GNU GCC Compiler' at "Selected compiler" is exactly the same as 'GNU GCC Compiler TDM 64b'
My PATH enviroment:
PATH=C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Skype\Phone\;C:\Users\MANOLO\AppData\Local\Microsoft\WindowsApps;
Can you reproduce the problem with a simple project?
I've reduced the offending project to the minimal, and changed some names. It's attached.
The problem still is there.
The issue comes from having two compilers for the same project. In my case both 32/64 versions of TDM-GCC, installed in different folders. Fresh C::B detects the 64 bits version.
Steps:
1) (optional) Remove %users%\YOURUSER\AppData\Roaming\Codeblocks folder, just to simulate a fresh nighty install
2) Open C::B 11552
3) Press OK on compiler detection, no need to select one.
4) Same for "file associations".
5) Create a "Empty project" in any folder, accept rest of options.
6) Add any .cpp with main().
7) Build->Compile current file works fine. Build and run works fine.
8) Settings->Compiler and use "Copy" button.
9) Adjust Compiler's installation directory and Toolchain executables.
i.e. C::B detected TDM-GCC-64. For second compiler (TDM-GCC-32) I changed x86_64-w64-mingw32-g++.exe to mingw32-g++.exe and so on for "C compiler", "C++ Compiler" and "Linker for dynamic libs"
Close the dialog with OK.
10) Project -> Build Options... change the compiler for "Debug", now to be the second created (copy of GNU GCC compiler).
11) In the "build target" combobox select "Debug".
12) Make a small change in the code so as to get it "invalidated" and need a new compilation.
13) Build->Compile current file fails.
14) If you first build this debug target, then using "Compile current file" works.