Marvee Amasi
Marvee Amasi
DIIDevHeads IoT Integration Server
Created by Marvee Amasi on 6/18/2024 in #middleware-and-os
How can I achieve deletion of StringWriter objects?
Hey everyone, I am using avr-g++ compiler on Windows for an AVR chip . I need to delete a StringWriter object created from a pointer to PacketWriter. As I define a destructor for StringWriter wether virtual or not, it leads to this error and similar ones. What could cause the 'undefined reference' error?
Undefined reference to 'operator delete(void*)'
Undefined reference to 'operator delete(void*)'
My PacketWriter.h:
class PacketWriter {
public:
virtual ~PacketWriter() {}
virtual uint8_t nextByte() = 0;
}
class PacketWriter {
public:
virtual ~PacketWriter() {}
virtual uint8_t nextByte() = 0;
}
StringWriter.h:
class StringWriter : public PacketWriter {
public:
StringWriter(const char* message);
virtual uint8_t nextByte();
}
class StringWriter : public PacketWriter {
public:
StringWriter(const char* message);
virtual uint8_t nextByte();
}
How can I achieve deletion of StringWriter objects in this context? @Middleware & OS
3 replies