Share

Bricx Command Center

Tracker: Bugs

5 Bluetooth programs won't compile (Linux) - ID: 1707131
Last Update: Settings changed ( brettpim )

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





brett stevens ( brettpim ) - 2007-04-25 06:37

5

Closed

None

John Hansen

NXC

compiler

Public


Comments ( 2 )




Date: 2007-04-26 04:26
Sender: brettpim


Thanks John,

I knew it must be something simple

brett


Date: 2007-04-25 12:45
Sender: afanofosc_99Project Admin


You must have an old copy of the NXCDefs.h header file on your system
which is being used instead of the one which is included in the b27 .tgz
compressed tar file. The correct version of the NXCDefs.h file should look
like this at the top of the file:

// Workfile:: NXCDefs.h
// Date:: 2007-02-11
// Revision:: 22

Near the end of the file it should have a line that looks like this:

#define ReceiveRemoteString(queue, clear, str) asm {
__receiveMessage(queue, clear, str, __RETVAL__) }

John Hansen


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 2 )

Field Old Value Date By
status_id Open 2007-04-26 04:26 brettpim
close_date - 2007-04-26 04:26 brettpim