I'm compiling with g++, and I have a abstract class:
when I try to compile it into a project I get an object file, but when compiling and linking I get:
I'm compiling using:
What am I doing wrong?
[plug=shameless]
[/plug]
Code:
class listener
{
public:
listener(){}
virtual ~listener(){};
virtual void actionPerformed(void* event,void* actor)=0;
private:
listener(const listener& l){}
};
when I try to compile it into a project I get an object file, but when compiling and linking I get:
Code:
listener.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
I'm compiling using:
Code:
g++ -c -g joystick.c -o joystick.o
g++ -c -g serial.c -o serial.o
g++ -c -g listener.h -o listener.o
g++ -c -g jslistener.c -o jslistener.o
g++ -c -g xbeejslistener.c -o xbeejslistener.o
g++ -c -g driver.c -o driver.o
g++ driver.o xbeejslistener.o jslistener.o serial.o joystick.o listener.o -o joydriver
What am I doing wrong?
[plug=shameless]
[/plug]