Help with c++ inheritance

Status
Not open for further replies.

skpang

Well-known member
I'm using Teensy 3.2 and trying to compile the example from this library:

https://github.com/sarfata/NMEA2000_teensy

The library uses inheritance from this library:

https://github.com/ttlappalainen/NMEA2000

The example code:
Code:
#include <NMEA2000.h>
#include <N2kMessages.h>
#include <NMEA2000_teensy.h>

tNMEA2000_teensy NMEA2000;

void setup() {
  NMEA2000.open();
}

void loop() {
}

but it won't compile. Its giving me this error:

nmea2000_test:8: error: 'class tNMEA2000_teensy' has no member named 'open'
NMEA2000.open();
^
'class tNMEA2000_teensy' has no member named 'open'

I can see the open() function in NMEA2000.h but somehow it is not inheriting it.

Any idea how I can fix this ?
 
Wow, with Open() it compiled. That means they have not compiled their example.

I can now move to the next stage.

Thank you for your help.
 
Status
Not open for further replies.
Back
Top