Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange warning with ld
    text
    copied!<p>I received this warning from <code>ld</code> whe I was buliding my program:</p> <blockquote> <p>ld: warning: direct access in global constructors keyed to <code>_ZN12_GLOBAL__N_143ensure_log_is_created_before_maing_l_filterEto</code> global weak symbol vtable for <code>cs::ObjectFactoryAliasInstantiation&lt;cs::DefaultCommandDispatcher&gt;</code> means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.</p> </blockquote> <p>The code witch refer the error is this:</p> <pre><code>class ObjectFactory { public : ObjectFactory(const char *alias):sAlias(alias){}; std::string sAlias; virtual void* createInstance() = 0; }; template &lt;class T&gt; class ObjectFactoryAliasInstantiation : public ObjectFactory{ public: ObjectFactoryAliasInstantiation(const char *alias):ObjectFactory(alias){}; void* createInstance() { return (void*)new T(&amp;sAlias); }; };` </code></pre> <p>and this:</p> <pre><code> /* Class for register the dispatcher for the command */ class CommandDispatcherRegister { public: CommandDispatcherRegister(ObjectFactory *commandFactory); }; /* Macro for help the Command Dispatcher classes registration */ #define REGISTER_AND_DEFINE_COMMAND_DISPATCHER_CLASS(CMD_CLASS_NAME) class CMD_CLASS_NAME;\ static const CommandDispatcherRegister CMD_CLASS_NAME ## CommandDispatcherRegister(new ObjectFactoryAliasInstantiation&lt;CMD_CLASS_NAME&gt;(#CMD_CLASS_NAME));\ class CMD_CLASS_NAME : public CommandDispatcher\ </code></pre> <p>end this:</p> <pre><code> REGISTER_AND_DEFINE_COMMAND_DISPATCHER_CLASS(DefaultCommandDispatcher) { bool deinitialized; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload