Mindstorms NXT NXC RemoteStopProgram fails compilation I have two NXT bricks connected and they work together using Bluetooth, sending messages between the two works. The master NXT will start a program on the slave NXT with the RemoteStartProgram function. However, when I try to use RemoteStopProgram the compilation fails with 'Unknown function' in BricxCC and with this error when compiled with nbc:

File "/home/paul/bricks/carjulie_bt.nxc" ; line 124
#   __connectionWrite (1, __DCStopProgramPacket, __D0main)
#----------------------------------------------------------
1 errors during compilation


This is the relevant portion of the code, what am I missing ?

task main() {
  if (BTConnectToNXT("Sarah", SLAVE_CONN)) {
    RemoteStartProgram(SLAVE_CONN, "carsarah_bt.rxe");
    bool result = RemoteConnectionIdle(SLAVE_CONN);
    if (result) {
      Precedes(ListenToSarah,LookAtColours);
    }
    RemoteStopProgram(SLAVE_CONN);  // This line does not compile ?!
  }
}


Edit 2020-05-16: There is a simple workaround for this error, just send a message to all slaves to execute stopalltasks() function.

This bug is now also on Debian bugs: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960772

EDIT 2020-05-18: SOLVED! This link https://sourceforge.net/p/bricxcc/code/HEAD/tree/x64/ contains a working nbc version for Linux! Thanks!!
Try changing which version of BricxCC you're using to one of the later releases:
http://bricxcc.sourceforge.net/test_releases/?C=M;O=D

What version are you using now?  I duplicated the compile error on v3.3.8.9, but I didn't get the compile error on v3.3.8.11:
http://bricxcc.sourceforge.net/test_releases/test_release20131007.zip

Hope that works!

PS: I didn't test anything, as I'm not using the feature -- I just saw it would compile on a different version.

If you use this, make sure you review compiler settings, as it looks like the newer version has [x] Enhanced Firmware option checked by default (which you may or may not have installed on your NXT brick, if using stock LEGO firmware).

Update #1:

According to https://sourceforge.net/p/bricxcc/code/HEAD/tree/NXT/history.txt, it may be a known issue that was fixed in a newer release:

Version 1.2.1.r5 (2013-02-16)
   :
- Fixed definition for several Remote* API functions which sent direct/system commands 
  to other NXT devices via Bluetooth or RS-485


So, it looks like 1.2.1r5 or newer version of NBC command-line tools may be required.

Also, the test release I downloaded (v3.3.8.11 of GUI) has nbc.exe v1.2.1.5, while the other version I have (v3.3.8.9 of GUI) has nbc.exe v1.2.1.4 -- so this may be the issue.

Update #2:

For Linux, see https://sourceforge.net/p/bricxcc/code/HEAD/tree/386/ and https://sourceforge.net/p/bricxcc/code/HEAD/tree/x64/ 32 and 64-bit binaries, respectively.