Problems in compiling RTT for RTEMS

Sambeet Panigrahi sambeet161616 at
Fri Jul 8 08:23:59 UTC 2016

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.

error: 'loading_lib' does not name a type
         loading_lib.createService =
(Service::shared_ptr(*)(void))(dlsym(handle, "createService") );
error: expected unqualified-id before 'if'
         if (loading_lib.createService)
error: expected unqualified-id before 'try'
         try {
error: expected unqualified-id before 'catch'
         } catch(std::exception& e) {
error: expected unqualified-id before 'catch'
         } catch(...) {
error: expected unqualified-id before 'if'
         if ( !success ) {
error: expected unqualified-id before 'if'
         if (kind == "typekit") {
error: expected unqualified-id before 'else'
         } else {
make[2]: ***
Error 1
make[1]: *** [rtt/CMakeFiles/orocos-rtt-rtems_static.dir/all] Error 2
make: *** [all] Error 2

I found that the first error is the root cause here.I found that the
 loading_lib object is declared as

log(Debug)<<"Found library "<<libname<<endlog();
    LoadedLib loading_lib(libname,shortname,handle);
    dlerror();    /* Clear any existing error */

Now in the PluginLoader.hpp file I find that the class LoadedLib has the
following structure

            class LoadedLib{
                LoadedLib(std::string n, std::string short_name, void* h)
                : filename(n), shortname(short_name), handle(h),
loadPlugin(0), is_typekit(false), is_service(false)
                 * File name of the library.
                std::string filename;
                 * Short name of the library (without lib/dll/so)
                std::string shortname;
                 * Advertised name by the plugin.
                std::string plugname;
                void* handle;
                bool (*loadPlugin)(RTT::TaskContext*);
                RTT::ServicePtr (*createService)(void);
                bool is_typekit, is_service;

The line causing the problem is related to

RTT::ServicePtr (*createService)(void);

And the I found that the RTT::ServicePtr is actually a typedef for a Boost

namespace RTT

    class Activity;
    class Alias;
    class CleanupHandle;
    class ConnPolicy;
    class ExecutionEngine;
    class Handle;
    class Logger;
    class PropertyBag;
    class ScopedHandle;
    class TaskContext;
    template<typename T>
    class Attribute;
    template<typename T>
    class Constant;
    template<typename T>
    class InputPort;
    template<typename FunctionT>
    class OperationCaller;
    template<class Signature>
    class Operation;
    template<typename T>
    class OutputPort;
    template<typename T>
    class Property;
    template<typename T>
    class SendHandle;
    struct ArgumentDescription;
    class ConfigurationInterface;
    class DataFlowInterface;
    class OperationInterface;
    class OperationInterfacePart;
    class Service;
    class ServiceRequester;
    typedef boost::shared_ptr<Service> ServicePtr;

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
. I don't understand why I get a 'does not name a type error'.

Can someone please help ?If more information is required please do mail me
or check my github repo

Thanks in advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list