B4R Question Where's the bug

vali khandangoll

Active Member
hi all of you.
i want to write simple string to file4.txt by this code

<code>
Dim filename As String
filename = "file4.txt"

If sd.OpenReadWrite(filename)=True Then
Dim te As String
Dim wB As UInt
Dim b() As Byte

te = "Terminator"
b=bc.StringToBytes(te)

sd.Position = sd.CurrentFile.Size
wB = sd.Stream.WriteBytes(b, 0 ,b.Length)
sd.Close
Else
Log("Cant open/create")
End If
</code>



but error apear like below

B4R Version: 3.31
Parsing code. (0.00s)
Building folders structure. (0.01s)
Compiling code. (0.00s)
Building project (0.06s)
Compiling & deploying Ino project (Arduino/Genuino Uno - COM12) Error
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
C:\Users\KHANDA~1\AppData\Local\Temp\ccQZjHVu.ltrans1.ltrans.o: In function `GetBytes':
D:\test\Objects\bin\sketch/B4RCore.cpp:335: undefined reference to `operator new(unsigned int, void*)'
collect2.exe: error: ld returned 1 exit status
exit status 1


i think error is in b=bc.StringToBytes(te) line 29 but i dont know why.
 

Attachments

  • 29.jpg
    29.jpg
    205.7 KB · Views: 153
Top