Code::Blocks Forums
User forums => Help => Topic started by: Jayx on December 11, 2017, 10:21:23 pm
-
I installed the latest free Embarcadero compiler 72 on code::blocks 16.01. Everything works, except that when there is an error and I press F9 (Build & Run), the compiler keeps on going, and runs the last successfully compiled executable (and scrolls the error messages out of view, so I will miss them, if I am not careful.)
Not a big deal, since I can always compile first with Ctrl-F9, and then run, but if there is an easy setting I have missed. I also have Visual Studio 2013 and Mingw-w64 set up on code::blocks in the same machine, they both stop after compile with errors.
-
Without a example build log it is difficult to help...
Codeblocks parses the output of the compiler with regexp. You can modify this expressions in
Settings->compiler->Global compiler settings
Select the compiler from the drop down menu on top
Scroll the taps to left by using the arrow until you reach "other settings"->Advanced options->Output parsing. There you can set the right regexp for the compiler error...
-
Thanks, I will need to digest those hieroglyphs for a while. Anyway, that pointed me to where the problem is - I copied the code::blocks default Borland 5.5 settings, and edited the toolchain and directories, while the advanced settings were left as is. I just tested those settings with the compiler that came with RAD Studio 2010, and they worked just fine, but Embarcadero has jumped on the Clang-train since... I am actually impressed that everything worked just fine apart from that small glitch.
So the problem is not code::blocks, but in the fact that Embarcadero compilers are no longer the same as Borland compilers 10 years ago. I'll sleep on it, and see if I can figure this out. Will post the answer here, if I stumble on it. If anyone else feels like trying, the latest 7.2 is free apart from the bother of registering at Embarcadero.
-
As i said, if you would post a full build log with an error and a warning, would help us a lot to help you.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
-
Build started on: 12-12-2017 at 01:49.14
Build ended on: 12-12-2017 at 01:49.15
-------------- Build: Debug in Borland (compiler: Embarcadero C++ 7.2 Old)---------------
bcc32c.exe -q -w -x -v -w -tWC -I"C:\Program Files\BCC101\include\dinkumware64" -I"C:\Program Files\BCC101\include\windows\crtl" -I"C:\Program Files\BCC101\include\windows\crtl\sys" -I"C:\Program Files\BCC101\include\windows\sdk" -I"C:\Program Files\BCC101\include\windows\sdk\gl" -I"C:\Program Files\BCC101\include\windows\sdk\idl" -I"C:\Program Files\BCC101\include" -I"C:\Program Files\BCC101\include\windows" -oobj\Debug\main.obj -c main.cpp
main.cpp:
main.cpp:16:5: error: unknown type name 'wi'
wi ndow(10,5,70,15);
^
1 error generated.
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
the wi ndow... is a deliberate typo to create an error. Anyway, as you pointed to the advanced settings, I am thinking the Embarcadero Clang compiler will probably like it better, if I set it up with GNU GCC as the base, rather than the old Borland, which I will try tomorrow.
-
Yes, this was definitely a matter of incompatible RegEx. Just for the hell of it, I copied the Compiler error RegEx from GNU GCC, and pasted on Embarcadero 7.2 -- the process now stops as it should at error, and compiler passes, the console output is run. There's still some tweaking to be done, but at least I now know where to look for it. Thanks again.
-
CB has support for clang, so why aren't you using it as a base?
-
This is for anyone else trying to do the same. I did try different ways to make this work, all failed - seems I already had accidentally stumbled on the one way this Embarcadero 7.2-Clang hybrid works:
Start by copying Embarcadero 5.5, set the paths and toochains to Embarcadero c++ 7.2 directories, and final tweak - and copy Compiler Error RegEx from GNU GCC. Does not work for single files, but everything works on a EC++7.2 project ;D