1

I created 4 libraries, each in .h and .cpp files, and tested them individually. I kept the project flexibility by defining 3 flags that allow or disallow the usage of the libraries.

When integrating them into project I received linking errors. During the debugging I reduced it to minimum - a single .ino file that contains the minimal declarations and calls; but the error messages are still fired.

I looked at the shrunk code (only 63 lines!) and saw no issue. I'd appreciate any help in finding the issue. enter image description here

The code:

#define RadioIncluded  
#define IrrigationStation  
#define RTCincluded

/********************************************/

#ifdef RTCincluded
class rtcHighLevel { public: String rtcInterpreter(String cmd); }; rtcHighLevel rtc; #endif

#ifdef IrrigationStation class measureEC { public: void initMeasurementStation (); String SD12_Parser (String commandLine); }; measureEC soilParams;

class valveControl { public: void valveInit(); }; valveControl valve; #endif

#ifdef RadioIncluded
class LoRaAddClass { public: void LoRaBegin(long BAND); }; LoRaAddClass LoRaAdd; #endif

/*********************************************************/ void setup() { Serial.begin(9600); while (!Serial) {};

#ifdef RadioIncluded
LoRaAdd.LoRaBegin(915000000); #endif

#ifdef IrrigationStation
valve.valveInit(); soilParams.initMeasurementStation(); #endif

#ifdef RTCincluded
String s = rtc.rtcInterpreter("A"); #endif } /*********************************************************/ void loop() {}

1 Answers1

1

Solved: while initially I devoted sub-directory for every class, no issues when all the classes were brought to the same folder with the INO file all the issues disappeared. Is this a known issue?