Page 1 of 1

BCC compiler bug

Posted: 31 Oct 2012, 17:07
by HaWe
here's another BCC bug:

If I #include a *.h file like
#include "stdio.h"

usually everything works well
- BUT -
if there is a compiler warning (no error, just a warning!) for a function listed in the .h file (like a redefinition of printf() ),
it shows this in the main file window like
"warning:.... redefinition of printf is not identical"
but in the .h file window it shows:
"# Error: Unexpected file type specified (.h)"

Furthermore, then there is no ctrl+F5 compile+download+start program functionality any more.
F5 or F6 and manual start by BtnCtr is possible though.

Re: BCC compiler bug

Posted: 31 Oct 2012, 23:34
by afanofosc
Technically, the NBC compiler does not know how to compile *.h files so that is why you get this particular message when you try (erroneously) to compile a .h file. The only file extension it supports for compiling NXC code is .nxc. The errors and warnings in included files are supposed to be shown in the main window error/warning list window and automatically open the included file if you click on the warning or error message.

To be clear, today I have told the NBC compiler to also handle .nxh and .h files as if they were NXC code.

John Hansen

Re: BCC compiler bug

Posted: 01 Nov 2012, 10:26
by HaWe
thank you very much!

Re: BCC compiler bug

Posted: 01 Nov 2012, 13:14
by afanofosc
I have uploaded a new test release which fixes the delimiter highlighting bug and includes .h and .nxh file extensions as valid NXC code for the compiler. It also corrects a serious problem from the previous test release where all the pre-NXT communication code was not linked into the application, which broke support for the RCX, Scout, Spybot, and Cybermaster. This was due to a build error that occurred when I built the last test release.

http://bricxcc.sourceforge.net/test_releases/

Grab the 20121101 zip.

John Hansen