I have a class Event and a subclass ServerEvent, however the Event class is only an interface for ServerEvent to extend/inherit from. When I run make an Event.o isn't generated and I get an error that it doesn't exist.

What's the right way to compile this interface and what to add in the makefile?
Also, the reason I have a protected constructor is so that Event can't be instantiated. I couldn't use a virtual constructor - what is the normal way to go about inheritance?

EDIT: including the makefile, ServerEvent.cpp and compile error now

Event.h

```
#ifndef EVENT_H
#define EVENT_H

#include <string>

#define EVENT_STOP 0
#define EVENT_START 1

class Event {
private:

protected:
    double time;
    std::string label;
    int type; // EVENT_START OR EVENT_STOP
    Event();

public:

};

#endif

```

ServerEvent.h

```
#ifndef SERVEREVENT_H
#define SERVEREVENT_H

#include "Event.h"
#include <vector>
class ServerEvent: public Event {
private:

public: 
    ServerEvent(std::vector<std::string> tokens);

};

#endif

```

ServerEvent.cpp

```
#include "Event.h"
#include "ServerEvent.h"
#include <cstdlib>
#include <sstream>

ServerEvent::ServerEvent(std::vector<std::string> tokens) {
    std::stringstream stream(tokens[0]);
    stream >> time;

}

```

makefile

```
OBJ = correngine.o CSVManager.o CorrelationEngineManager.o ServerEvent.o
CC = g++
CFLAGS = -c -Wall -pedantic
LFLAGS = -Wall -pedantic
EXE =   correngine 

correngine : $(OBJ) 
    $(CC) $(LFLAGS) $(OBJ) -o $(EXE)

correngine.o : correngine.cpp correngine.h CSVManager.h
    $(CC) $(CFLAGS) correngine.cpp

CSVManager.o : CSVManager.cpp CSVManager.h
    $(CC) $(CFLAGS) CSVManager.cpp

CorrelationEngineManager.o : CorrelationEngineManager.cpp CorrelationEngineManager.h Event.o
    $(CC) $(CFLAGS) CorrelationEngineManager.cpp

Event.o : Event.h
    $(CC) $(CFLAGS) Event.h

ServerEvent.o: ServerEvent.cpp ServerEvent.h Event.h
    $(CC) $(CFLAGS) ServerEvent.cpp 

clean : 
    \rm *.o $(EXE)

```

compile error

```
ServerEvent.o: In function `ServerEvent::ServerEvent(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)':
ServerEvent.cpp:(.text+0x11): undefined reference to `Event::Event()'
ServerEvent.o: In function `ServerEvent::ServerEvent(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)':
ServerEvent.cpp:(.text+0xe1): undefined reference to `Event::Event()'
collect2: ld returned 1 exit status
make: *** [correngine] Error 1

```