Author Topic: Embarcadero C++ 7.2 does not stop at errors.  (Read 4004 times)

Offline Jayx

  • Single posting newcomer
  • *
  • Posts: 5
Embarcadero C++ 7.2 does not stop at errors.
« 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.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Embarcadero C++ 7.2 does not stop at errors.
« Reply #1 on: December 11, 2017, 10:32:27 pm »
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...

Offline Jayx

  • Single posting newcomer
  • *
  • Posts: 5
Re: Embarcadero C++ 7.2 does not stop at errors.
« Reply #2 on: December 11, 2017, 11:25:06 pm »
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.
« Last Edit: December 12, 2017, 05:46:11 pm by Jayx »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Embarcadero C++ 7.2 does not stop at errors.
« Reply #3 on: December 11, 2017, 11:55:49 pm »
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

Offline Jayx

  • Single posting newcomer
  • *
  • Posts: 5
Re: Embarcadero C++ 7.2 does not stop at errors.
« Reply #4 on: December 12, 2017, 01:22:00 am »
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.
 

Offline Jayx

  • Single posting newcomer
  • *
  • Posts: 5
Re: Embarcadero C++ 7.2 does not stop at errors. [SOLVED]
« Reply #5 on: December 12, 2017, 01:31:35 am »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Embarcadero C++ 7.2 does not stop at errors.
« Reply #6 on: December 12, 2017, 02:14:52 am »
CB has support for clang, so why aren't you using it as a base?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jayx

  • Single posting newcomer
  • *
  • Posts: 5
Re: Embarcadero C++ 7.2 does not stop at errors.
« Reply #7 on: January 03, 2018, 04:58:16 pm »
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