Page 1 of 1

Trick to see compilation errors (Flowcode V2 only)

Posted: Wed Jan 04, 2006 3:55 pm
by Steve
Here's something that may help some of you, especially if you embed your own C or assembly code into FlowCode.

Normally, the errors generated by the compiler are displayed so fast that it is practically impossible to see them. To get around this, I run a batch file instead of the C compiler directly and put a 'pause' statement in the batch file so that I can review the errors before proceeding.


(1) In FlowCode, select "PIC...Compiler Options" from the menu and take note of the "C Compiler" entry. For example, mine is set to the following:

d:\Program Files\Matrix Multimedia\Flowcode\C2C\c2c.exe -PPIC%p -IP%p.inc


(2) Create a batch file called "c2cpause.bat" with the following lines and save it into the same directory as your C2C compiler (as shown in the "Compiler Options" dialog):

@echo off
"D:\Program Files\Matrix Multimedia\Flowcode\C2C\c2c.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
echo "Press a key to continue..."
pause

[NOTE: replace the c2c.exe path with the one appropriate to your system - probably on the C drive]


(3) Replace the "C Compiler" entry in FlowCode with the following (again, use the appropriate path):

"d:\Program Files\Matrix Multimedia\Flowcode\C2C\c2cpause.bat" -PPIC%p -IP%p.inc

[NOTE: the quotes around the pathof the batch file are important]


Now when you compile your FlowCode programs, the messages (and errors?) generated by the C2C compiler will remain on the screen. Of course, you will need to press a key to allow FlowCode to pass the generated ASM file onto the assembler.

If you find this annoying and wish to revert to the original setting, click the "restore defaults" button in the "Compiler Options" dialog.

I hope this trick proves useful.

Posted: Thu Jan 05, 2006 9:11 pm
by jimhumphries
Steve:

Very cool! For what I need this answers my "expanded error messaging" wish list item for V3.

Thanks,

Jim