1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

BCC compiler bug

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.

BCC compiler bug

Postby doc-helmut » 31 Oct 2012, 17:07

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.
regards,
HaWe
±≠≈αγδεωΔΦΣ∫√∅∞
NXC CHESS for NXT: http://www.mindstormsforum.de/viewtopic.php?f=70&t=6790
indispensable for NXC + EV3-C: easy + trouble-free network & sensor+motor remote control for rs485, BT, USB!
User avatar
doc-helmut
 
Posts: 2424
Joined: 29 Sep 2010, 14:25

Re: BCC compiler bug

Postby afanofosc » 31 Oct 2012, 23:34

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

Re: BCC compiler bug

Postby doc-helmut » 01 Nov 2012, 10:26

thank you very much!
regards,
HaWe
±≠≈αγδεωΔΦΣ∫√∅∞
NXC CHESS for NXT: http://www.mindstormsforum.de/viewtopic.php?f=70&t=6790
indispensable for NXC + EV3-C: easy + trouble-free network & sensor+motor remote control for rs485, BT, USB!
User avatar
doc-helmut
 
Posts: 2424
Joined: 29 Sep 2010, 14:25

Re: BCC compiler bug

Postby afanofosc » 01 Nov 2012, 13:14

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


Return to Mindstorms Software

Who is online

Users browsing this forum: No registered users and 1 guest