Resolving a linker error: undefined reference to static class members

后端 未结 4 1253
甜味超标
甜味超标 2020-12-21 03:31

My code is Arduinoish. I turned on verbose compiling so I could verify that all the .o files are indeed getting passed to the linker correctly, and they are (linker command

4条回答
  •  伪装坚强ぢ
    2020-12-21 04:14

    You need to create memory and initialize your static variables.

    In your CPP file add the following:

    NewSoftSerial SerialServoControl::_serial(9, 8);
    char SerialServoControl::_tx = 0;
    char SerialServoControl::_rx = 0;
    

提交回复
热议问题