Hi,
I put the 2 lines of code into rmves.cpp
#include <iostream>
#include "rmves.h"
#include "rs232.h"
RS232_Controller *rs232;
int main (int argc, char *argv[])
{
bool res;
pthread_t tid;
rs232 = new RS232_Controller();
res = rs232->CreateThread();
rs232->Join(rs232->getThread(0));
return 0;
}
==============================================================
[root@localhost Ver2_0]# make
if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"rmves\" -DVERSION=\"2.0\" -I. -I. -I -I. -I/opt/arcom/arcom-linux/include -I/usr/local/include -I/opt/arcom/arcom-linux/include/glib2.0 -g -O2 -MT rmves.o -MD -MP -MF ".deps/rmves.Tpo" -c -o rmves.o `test -f 'src/rmves.cpp' || echo './'`src/rmves.cpp; \
then mv -f ".deps/rmves.Tpo" ".deps/rmves.Po"; else rm -f ".deps/rmves.Tpo"; exit 1; fi
src/rmves.cpp:17:2: warning: no newline at end of file
src/rmves.h:66: error: ISO C++ forbids declaration of ‘RS232_Controller’ with no type
src/rmves.h:66: error: expected ‘;’ before ‘*’ token
src/rmves.h:85: error: ISO C++ forbids declaration of ‘RS232_Controller’ with no type
src/rmves.h:85: error: expected ‘;’ before ‘*’ token
src/rmves.h:104: error: ISO C++ forbids declaration of ‘RS232_Controller’ with no type
src/rmves.h:104: error: expected ‘;’ before ‘*’ token
src/rmves.h:124: error: ISO C++ forbids declaration of ‘RS232_Controller’ with no type
src/rmves.h:124: error: expected ‘;’ before ‘*’ token
src/rmves.cpp: In function ‘int main(int, char**)’:
src/rmves.cpp:13: error: cannot allocate an object of abstract type ‘RS232_Controller’
src/rs232.h:17: note: because the following virtual functions are pure within ‘RS232_Controller’:
src/rmves.h:40: note: virtual void SubjectEx::Attach(Observer*)
src/rmves.h:41: note: virtual void SubjectEx:
etach(Observer*)
src/rmves.h:42: note: virtual void SubjectEx::Notify(Observer*)
make: *** [rmves.o] Error 1
Thanks
Jack