theilem / uavEE

Modular Emulation Environment for rapid Development and Testing of Unmanned Aerial Vehicles
GNU General Public License v3.0
6 stars 2 forks source link

error: ‘AutopilotInterfaceFactory::typeId’ cannot be used as a function #4

Closed shujaatak closed 5 years ago

shujaatak commented 5 years ago

/usr/local/include/uavAP/Core/Framework/Helper.h:142:40: error: ‘AutopilotInterfaceFactory::typeId’ cannot be used as a function std::string type = FactoryType::typeId();

In file included from /home/shujaat/Desktop/Theilem-UAV/Theilem/uavEE/src/autopilot_interface/include/autopilot_interface/AutopilotInterfaceHelper.h:32:0,
                 from /home/shujaat/Desktop/Theilem-UAV/Theilem/uavEE/src/autopilot_interface/src/autopilot_interface_node.cpp:26:
/usr/local/include/uavAP/Core/Framework/Helper.h: In instantiation of ‘void Helper::addFactory(PluginRestriction) [with FactoryType = AutopilotInterfaceFactory]’:
/home/shujaat/Desktop/Theilem-UAV/Theilem/uavEE/src/autopilot_interface/include/autopilot_interface/AutopilotInterfaceHelper.h:57:41:   required from here
/usr/local/include/uavAP/Core/Framework/Helper.h:142:40: error: ‘AutopilotInterfaceFactory::typeId’ cannot be used as a function
  std::string type = FactoryType::typeId();
                                        ^
autopilot_interface/CMakeFiles/autopilot_interface_node.dir/build.make:62: recipe for target 'autopilot_interface/CMakeFiles/autopilot_interface_node.dir/src/autopilot_interface_node.cpp.o' failed
make[2]: *** [autopilot_interface/CMakeFiles/autopilot_interface_node.dir/src/autopilot_interface_node.cpp.o] Error 1
CMakeFiles/Makefile2:1642: recipe for target 'autopilot_interface/CMakeFiles/autopilot_interface_node.dir/all' failed
make[1]: *** [autopilot_interface/CMakeFiles/autopilot_interface_node.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
MacProSector commented 5 years ago

Could you make sure if the latest master of uavAP has been compiled and installed using "make && sudo make install" command?

shujaatak commented 5 years ago

Yes the latest master of uavAP has been compiled and installed using "make && sudo make install" command few hours ago.

shujaatak commented 5 years ago

I had used the "make && sudo make install" command from inside bld/Release directory only.

shujaatak commented 5 years ago

Could it be a compiler issue? as uavAP had not thrown any issues with gcc version but when I started compiling uavEE I save some errors stating that I was using the newer version of gcc instead of g++5 so I installed g++5 using command: sudo apt install g++5, and then uavEE stoped complaining about the version but this version may be seeing this FactoryType::typeId(); as an error.

MacProSector commented 5 years ago

I apologized for the problems again. It seems that some issues that were resolved in advanced_control were not reflected in master. We plan to merge advanced_control in master soon and that should resolve all the problems. For now, could you checkout advanced_control for both uavAP and uavEE, redo all the setup and building procedures and try compiling again? I am actively maintaining advanced_control branch currently and it has been deployed onto the aircraft recently. I will leave this issue open and keep you updated about the coming merging. Thank you.

shujaatak commented 5 years ago

I will be waiting for the coming merging and in the mean time I will checkout advanced_control for both uavAP and uavEE, redo all the setup and building procedures and try compiling again.

theilem commented 5 years ago

This issue did not need to be resolved with a merge. I just pushed the necessary changes. The standard for the typeId has changed in the latest version of uavAP. It was in the Factory instead of the Interface which did not make sense. Adapting the uavEE code to this change should fix the issue.