<div dir="ltr">Hi,<div>I am trying to compile RTT for RTEMS. I have made the necesary changes in the OS headers for RTEMS for i386 architecture.However on building I get the following error.</div><div><br></div><div><div>home/sambeet/NewRockPort/x86/Build/rock/rtt/rtt/plugin/PluginLoader.cpp:711:9: error: 'loading_lib' does not name a type</div><div>  Â  Â  Â  Â loading_lib.createService = (Service::shared_ptr(*)(void))(dlsym(handle, "createService") );</div><div>  Â  Â  Â  Â ^</div><div>/home/sambeet/NewRockPort/x86/Build/rock/rtt/rtt/plugin/PluginLoader.cpp:712:9: error: expected unqualified-id before 'if'</div><div>  Â  Â  Â  Â if (loading_lib.createService)</div><div>  Â  Â  Â  Â ^</div><div>/home/sambeet/NewRockPort/x86/Build/rock/rtt/rtt/plugin/PluginLoader.cpp:717:9: error: expected unqualified-id before 'try'</div><div>  Â  Â  Â  Â try {</div><div>  Â  Â  Â  Â ^</div><div>/home/sambeet/NewRockPort/x86/Build/rock/rtt/rtt/plugin/PluginLoader.cpp:720:11: error: expected unqualified-id before 'catch'</div><div>  Â  Â  Â  Â } catch(std::exception& e) {</div><div>  Â  Â  Â  Â  Â ^</div><div>/home/sambeet/NewRockPort/x86/Build/rock/rtt/rtt/plugin/PluginLoader.cpp:722:11: error: expected unqualified-id before 'catch'</div><div>  Â  Â  Â  Â } catch(...) {</div><div>  Â  Â  Â  Â  Â ^</div><div>/home/sambeet/NewRockPort/x86/Build/rock/rtt/rtt/plugin/PluginLoader.cpp:726:9: error: expected unqualified-id before 'if'</div><div>  Â  Â  Â  Â if ( !success ) {</div><div>  Â  Â  Â  Â ^</div><div>/home/sambeet/NewRockPort/x86/Build/rock/rtt/rtt/plugin/PluginLoader.cpp:731:9: error: expected unqualified-id before 'if'</div><div>  Â  Â  Â  Â if (kind == "typekit") {</div><div>  Â  Â  Â  Â ^</div><div>/home/sambeet/NewRockPort/x86/Build/rock/rtt/rtt/plugin/PluginLoader.cpp:734:11: error: expected unqualified-id before 'else'</div><div>  Â  Â  Â  Â } else {</div><div>  Â  Â  Â  Â  Â ^</div><div>make[2]: *** [rtt/CMakeFiles/orocos-rtt-rtems_static.dir/plugin/PluginLoader.cpp.o] Error 1</div><div>make[1]: *** [rtt/CMakeFiles/orocos-rtt-rtems_static.dir/all] Error 2</div><div>make: *** [all] Error 2</div></div><div><br></div><div>I found that the first error is the root cause here.I found that the Â loading_lib object is declared as</div><div><br></div><div><div>log(Debug)<<"Found library "<<libname<<endlog();</div><div>  Â  LoadedLib loading_lib(libname,shortname,handle);</div><div>  Â  dlerror(); Â  Â /* Clear any existing error */</div></div><div><br></div><div>Now in the PluginLoader.hpp file I find that the class LoadedLib has the following structure</div><div><br></div><div><div>  */</div><div>  Â  Â  Â  Â  Â  class LoadedLib{</div><div>  Â  Â  Â  Â  Â  public:</div><div>  Â  Â  Â  Â  Â  Â  Â  LoadedLib(std::string n, std::string short_name, void* h)</div><div>  Â  Â  Â  Â  Â  Â  Â  : filename(n), shortname(short_name), handle(h), loadPlugin(0), is_typekit(false), is_service(false)</div><div>  Â  Â  Â  Â  Â  Â  Â  {</div><div>  Â  Â  Â  Â  Â  Â  Â  }</div><div>  Â  Â  Â  Â  Â  Â  Â  /**</div><div>  Â  Â  Â  Â  Â  Â  Â  Â * File name of the library.</div><div>  Â  Â  Â  Â  Â  Â  Â  Â */</div><div>  Â  Â  Â  Â  Â  Â  Â  std::string filename;</div><div>  Â  Â  Â  Â  Â  Â  Â  /**</div><div>  Â  Â  Â  Â  Â  Â  Â  Â * Short name of the library (without lib/dll/so)</div><div>  Â  Â  Â  Â  Â  Â  Â  Â */</div><div>  Â  Â  Â  Â  Â  Â  Â  std::string shortname;</div><div>  Â  Â  Â  Â  Â  Â  Â  /**</div><div>  Â  Â  Â  Â  Â  Â  Â  Â * Advertised name by the plugin.</div><div>  Â  Â  Â  Â  Â  Â  Â  Â */</div><div>  Â  Â  Â  Â  Â  Â  Â  std::string plugname;</div><div>  Â  Â  Â  Â  Â  Â  Â  void* handle;</div><div>  Â  Â  Â  Â  Â  Â  Â  bool (*loadPlugin)(RTT::TaskContext*);</div><div>  Â  Â  Â  Â  Â  Â  Â  RTT::ServicePtr (*createService)(void);</div><div>  Â  Â  Â  Â  Â  Â  Â  bool is_typekit, is_service;</div><div>  Â  Â  Â  Â  Â  };</div></div><div><br></div><div>The line causing the problem is related to</div><div><br></div><div>RTT::ServicePtr (*createService)(void);<br></div><div><br></div><div>And the I found that the RTT::ServicePtr is actually a typedef for a Boost Â ServicePtr</div><div><br></div><div><div>namespace RTT</div><div>{</div><div><br></div><div>  Â  class Activity;</div><div>  Â  class Alias;</div><div>  Â  class CleanupHandle;</div><div>  Â  class ConnPolicy;</div><div>  Â  class ExecutionEngine;</div><div>  Â  class Handle;</div><div>  Â  class Logger;</div><div>  Â  class PropertyBag;</div><div>  Â  class ScopedHandle;</div><div>  Â  class TaskContext;</div><div>  Â  template<typename T></div><div>  Â  class Attribute;</div><div>  Â  template<typename T></div><div>  Â  class Constant;</div><div>  Â  template<typename T></div><div>  Â  class InputPort;</div><div>  Â  template<typename FunctionT></div><div>  Â  class OperationCaller;</div><div>  Â  template<class Signature></div><div>  Â  class Operation;</div><div>  Â  template<typename T></div><div>  Â  class OutputPort;</div><div>  Â  template<typename T></div><div>  Â  class Property;</div><div>  Â  template<typename T></div><div>  Â  class SendHandle;</div><div>  Â  struct ArgumentDescription;</div><div>  Â  class ConfigurationInterface;</div><div>  Â  class DataFlowInterface;</div><div>  Â  class OperationInterface;</div><div>  Â  class OperationInterfacePart;</div><div>  Â  class Service;</div><div>  Â  class ServiceRequester;</div><div>  Â  typedef boost::shared_ptr<Service> ServicePtr;</div><div>}</div></div><div><br></div><div><br></div><div>I have not made major changes in the Pluginloader.cpp file and I have also checked that required Boost libraries for Service::shared_ptr(*)(void))(dlsym(handle, "createService") ) exists. found that </div><div>. I don't understand why I get a 'does not name a type error'.</div><div><br></div><div>Can someone please help ?If more information is required please do mail me or check my github repo </div><div><a href="https://github.com/Sambeet161616/rtt">https://github.com/Sambeet161616/rtt</a></div><div><br></div><div>Thanks in advance.</div><div><br></div><div>Regards</div><div>Sambeet</div></div>