BCC compiler bug

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

BCC compiler bug

Post 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.
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: BCC compiler bug

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: BCC compiler bug

Post by HaWe »

thank you very much!
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: BCC compiler bug

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest