Sming - Open Source framework for high efficiency native ESP8266 development

User avatar
By Cap
#47378 Any considerations that went into deciding for/against using namespaces in Sming framework? Any thoughts in adding namespace to the SmingCore and other subsystems in the future?
User avatar
By zhivko
#47435 Yes since I would like to use code from another opensource project, I do not see any other option than using namespace to prevent symbol overlaping.

I try to use google protobuf in SmingRTOS and for example
in file: google/protobuf/message.h
where source is:
Code: Select alltemplate<typename PB>
inline const RepeatedPtrField<PB>& Reflection::GetRepeatedPtrField(
    const Message& message, const FieldDescriptor* field) const {
  return *static_cast<RepeatedPtrField<PB>* >(
      MutableRawRepeatedField(const_cast<Message*>(&message), field,
          FieldDescriptor::CPPTYPE_MESSAGE, -1,
          PB::default_instance().GetDescriptor()));
}


I get:
Description Resource Path Location Type
expected a type, got '2' message.h /RTOS-Stepper-DM542/app/google/protobuf line 846 C/C++ Problem

thats because PB is defined in SmintRTOS file pins_arduino.h like:
Code: Select all#define PB 2