B4R Question SerialNative2 and AsyncStreams

rodmcm

Active Member
Licensed User
I am trying to attach astreams to SerialNative 2 to catch incoming messages. Tried lots of combinations, but at limit of understanding.
This is the compile error file

Verifying...
In file included from C:\RODSFI~1\RODSPL~1\RODTOO~1\B4A\RODSRP~1\SERIAL~1\Objects\bin\sketch\B4RDefines.h:25:0,
from C:\RODSFI~1\RODSPL~1\RODTOO~1\B4A\RODSRP~1\SERIAL~1\Objects\bin\sketch\AsyncStreams.cpp:1:
C:\RODSFI~1\RODSPL~1\RODTOO~1\B4A\RODSRP~1\SERIAL~1\Objects\bin\sketch\AsyncStreams.cpp: In static member function 'static void B4R::AsyncStreams::checkForData(void*)':
rCore.h:580: error: no matching function for call to 'operator new(sizetype, byte*)'
#define CreateStackMemoryObject(type) new (StackMemory::buffer + AlignCP) type(); StackMemory::cp += sizeof(type)
^
C:\RODSFI~1\RODSPL~1\RODTOO~1\B4A\RODSRP~1\SERIAL~1\Objects\bin\sketch\AsyncStreams.cpp:27:20: note: in expansion of macro 'CreateStackMemoryObject'
ArrayByte* arr = CreateStackMemoryObject(ArrayByte);
^
<built-in>: note: candidate: void* operator new(unsigned int)
<built-in>: note: candidate expects 1 argument, 2 provided
exit status 1
 

Attachments

  • Serial2Play1.b4r.zip
    59.8 KB · Views: 282

rodmcm

Active Member
Licensed User
Works fine without SKIP_B4RNEW

Thanks.. I left it in as you had told me on a previous post to include it for B4r compile problems

Would you mind if I post the complete (and running) program to 'code snippets' there may be others looking at the other hardware serials
 
Upvote 0
Top