When I try to compile the following master program from Danny
Benedettelli's tutorial I get the compiler errors that I include at the
end:
//MASTER
#include "NXCDefs.h"
#define BT_CONN 1
#define INBOX 1
#define OUTBOX 5
sub BTCheck(int conn){
if (!BluetoothStatus(conn)==NO_ERR){
TextOut(5,LCD_LINE2,"Error");
Wait(1000);
Stop(true);
}
}
task main(){
string in, out, iStr;
int i = 0;
BTCheck(BT_CONN); //check slave connection
while(true){
iStr = NumToStr(i);
out = StrCat("M",iStr);
TextOut(10,LCD_LINE1,"Master Test");
TextOut(0,LCD_LINE2,"IN:");
TextOut(0,LCD_LINE4,"OUT:");
ReceiveRemoteString(INBOX, true, in);
SendRemoteString(BT_CONN,OUTBOX,out);
TextOut(10,LCD_LINE3,in);
TextOut(10,LCD_LINE5,out);
Wait(100);
i++;
}
}
errors generated by command "nbc master_test.nxc -O=mt.rxe":
# Error: Undefined Identifier ReceiveRemoteString
File "/home/brett/Projects/Lego/Programs/mt.nxc" ; line 24
# ReceiveRemoteString(
#----------------------------------------------------------
# Error: Unknown data type
File "/home/brett/Projects/Lego/Programs/mt.nxc" ; line 24
# ReceiveRemoteString(
#----------------------------------------------------------
# Error: '=' expected
File "/home/brett/Projects/Lego/Programs/mt.nxc" ; line 24
# ReceiveRemoteString(1
#----------------------------------------------------------
# Error: Unknown data type
File "/home/brett/Projects/Lego/Programs/mt.nxc" ; line 24
# ReceiveRemoteString(1,
#----------------------------------------------------------
# Error: parser error
File "/home/brett/Projects/Lego/Programs/mt.nxc" ; line 24
# ReceiveRemoteString(1,
#----------------------------------------------------------
# Error: Undefined Identifier SendRemoteString
File "/home/brett/Projects/Lego/Programs/mt.nxc" ; line 25
# SendRemoteString(
#----------------------------------------------------------
# Error: Unknown data type
File "/home/brett/Projects/Lego/Programs/mt.nxc" ; line 25
# SendRemoteString(
#----------------------------------------------------------
# Error: '=' expected
File "/home/brett/Projects/Lego/Programs/mt.nxc" ; line 25
# SendRemoteString(1
#----------------------------------------------------------
# Error: Unknown data type
File "/home/brett/Projects/Lego/Programs/mt.nxc" ; line 25
# SendRemoteString(1,5
#----------------------------------------------------------
# Error: parser error
File "/home/brett/Projects/Lego/Programs/mt.nxc" ; line 25
# SendRemoteString(1,5
#----------------------------------------------------------
I am running nbc version 1.0.1.b27, on Mandriva x86 linux.
thanks
brett
John Hansen
NXC
compiler
Public
|
Date: 2007-04-26 04:26
|
|
Date: 2007-04-25 12:45
|
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2007-04-26 04:26 | brettpim |
| close_date | - | 2007-04-26 04:26 | brettpim |