Greetings,

I am trying to modify an old version of a plugin driver that I used to write for our robot (romaa)
for Player 2.1.2, and despite this driver is a limited version it works (in player 2.1.2)
I follow the instructions in the Player3.0 Upgrade wiki
http://playerstage.sourceforge.net/wiki/Player_3.0_Upgrade
I changed the names of the inhereted class and the names of methods, but it gives a lots of errors, that are shown below

[100%] Building CXX object CMakeFiles/romaadriver.dir/src/romaadriver.o
In file included from /home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx:2:
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/h/romaadriver..h:19: error: expected class-name before ‘{’ token
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx: In constructor ‘RomaaDriver::RomaaDriver(ConfigFile*, int)’:
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx:14: error: class ‘RomaaDriver’ does not have any field named ‘ThreadedDriver’
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx:24: error: ‘class RomaaDriver’ has no member named ‘AddInterface’
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx:27: error: ‘class RomaaDriver’ has no member named ‘SetError’
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx: In member function ‘virtual int RomaaDriver::ProcessMessage(QueuePointer&, player_msghdr*, void*)’:
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx:203: error: ‘Publish’ was not declared in this scope
/home/gfpp/programas/player/20100127_romaa_player_driver_3..0/src/romaadriver.cxx:233: error: ‘Publish’ was not declared in this scope
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx:249: error: ‘Publish’ was not declared in this scope
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx:259: error: ‘Publish’ was not declared in this scope
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver..cxx: In member function ‘virtual void RomaaDriver::Main()’:
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx:287: error: ‘class RomaaDriver’ has no member named ‘ProcessMessages’
/home/gfpp/programas/player/20100127_romaa_player_driver_3.0/src/romaadriver.cxx:306: error: ‘Publish’ was not declared in this scope
make[2]: *** [CMakeFiles/romaadriver.dir/src/romaadriver.o] Error 1
make[1]: *** [CMakeFiles/romaadriver.dir/all] Error 2
make: *** [all] Error 2

After that, I prove the exampledriver include in the player sources, and the errors are similar (shown below), mainly those related with the Publish and ProcessMessages methods and the line

" expected class-name before ‘{’ token "


[100%] Building CXX object CMakeFiles/exampledriver.dir/exampledriver.o
/home/gfpp/Desktop/exampledriver/exampledriver.cc:39:38: error: libplayercore/playercore.h: No existe el fichero o el directorio
/home/gfpp/Desktop/exampledriver/exampledriver.cc:44: error: expected class-name before ‘{’ token
/home/gfpp/Desktop/exampledriver/exampledriver.cc:48: error: expected `)' before ‘*’ token
/home/gfpp/Desktop/exampledriver/exampledriver.cc:51: error: ‘QueuePointer’ has not been declared
/home/gfpp/Desktop/exampledriver/exampledriver.cc:52: error: ‘player_msghdr’ has not been declared
/home/gfpp/Desktop/exampledriver/exampledriver.cc:69: error: expected constructor, destructor, or type conversion before ‘*’ token
/home/gfpp/Desktop/exampledriver/exampledriver.cc:80: error: variable or field ‘ExampleDriver_Register’ declared void
/home/gfpp/Desktop/exampledriver/exampledriver.cc:80: error: ‘DriverTable’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc:80: error: ‘table’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc:88: error: expected `)' before ‘*’ token
/home/gfpp/Desktop/exampledriver/exampledriver.cc: In member function ‘virtual int ExampleDriver::MainSetup()’:
/home/gfpp/Desktop/exampledriver/exampledriver.cc:102: error: ‘puts’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc:107: error: ‘printf’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc: In member function ‘virtual void ExampleDriver::MainQuit()’:
/home/gfpp/Desktop/exampledriver/exampledriver.cc:119: error: ‘puts’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc: At global scope:
/home/gfpp/Desktop/exampledriver/exampledriver.cc:127: error: ‘int ExampleDriver::ProcessMessage’ is not a static member of ‘class ExampleDriver’
/home/gfpp/Desktop/exampledriver/exampledriver.cc:127: error: ‘QueuePointer’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc:127: error: ‘resp_queue’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc:128: error: ‘player_msghdr’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc:128: error: ‘hdr’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc:129: error: expected primary-expression before ‘void’
/home/gfpp/Desktop/exampledriver/exampledriver.cc:129: error: initializer expression list treated as compound expression
/home/gfpp/Desktop/exampledriver/exampledriver.cc:130: error: expected ‘,’ or ‘;’ before ‘{’ token
/home/gfpp/Desktop/exampledriver/exampledriver.cc: In member function ‘virtual void ExampleDriver::Main()’:
/home/gfpp/Desktop/exampledriver/exampledriver.cc:147: error: ‘pthread_testcancel’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc:151: error: ‘ProcessMessages’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc: At global scope:
/home/gfpp/Desktop/exampledriver/exampledriver.cc:166: error: ‘DriverTable’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc:166: error: ‘table’ was not declared in this scope
/home/gfpp/Desktop/exampledriver/exampledriver.cc:167: error: expected ‘,’ or ‘;’ before ‘{’ token
make[2]: *** [CMakeFiles/exampledriver.dir/exampledriver.o] Error 1
make[1]: *** [CMakeFiles/exampledriver.dir/all] Error 2
make: *** [all] Error 2

May be I missed a header file, or the error could be in the CMakeList (I don't know how cmake works).
If anybody has some ideas on this I will be much appreciated

Thanks in advance




Encontra las mejores recetas con Yahoo! Cocina.
http://ar.mujer.yahoo.com/cocina/