<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>