Changes between Version 3 and Version 4 of FAQ_compilation


Ignore:
Timestamp:
10/11/13 15:27:46 (11 years ago)
Author:
Marek Kurdej
Comment:

addInputs() / addOutputs() needs QObject

Legend:

Unmodified
Added
Removed
Modified
  • FAQ_compilation

    v3 v4  
     1[[PageOutline(1-10,Contents,inline)]]
     2
    13= FAQ ^([#fnfaq 1])^ -- common compilation errors =
    24
     
    41432. Add ```${MOC_FILES}``` to the list of sources used by ```pacpus_add_library``` or ```pacpus_add_executable```.
    4244
     45=== ```addInputs()``` / ```addOutputs``` can be used only in a class derived from ```QObject``` ===
     46==== Error message ====
     47{{{
     48>C:\Program Files (x86)\Pacpus\include\Pacpus/kernel/InputOutputInterface.h(21): error C2664: 'pacpus::InputInterfaceBase::InputInterfaceBase(QString,pacpus::ComponentBase *,QObject *)' : cannot convert parameter 3 from 'pacpus::LMOComponent *' to 'QObject *'
     49>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
     50>          C:\Program Files (x86)\Pacpus\include\Pacpus/kernel/InputOutputInterface.h(18) : while compiling class template member function 'pacpus::InputInterface<T,C>::InputInterface(QString,C *,void (__thiscall pacpus::Component::* )(const T &))'
     51>          with
     52>          [
     53>              T=pacpus::___,
     54>              C=pacpus::Component
     55>          ]
     56>          C:\Program Files (x86)\Pacpus\include\Pacpus/kernel/ComponentBase.h(150) : see reference to class template instantiation 'pacpus::InputInterface<T,C>' being compiled
     57>          with
     58>          [
     59>              T=pacpus::___,
     60>              C=pacpus::Component
     61>          ]
     62>          ..\..\..\cityvip-2.0-beta1\src\LMOComponent\Component.cpp(44) : see reference to function template instantiation 'void pacpus::ComponentBase::addInput<pacpus::___,pacpus::Component,void(__thiscall pacpus::Component::* )(const pacpus::___ &)>(const char *,Function)' being compiled
     63>          with
     64>          [
     65>              Function=void (__thiscall pacpus::Component::* )(const pacpus::___ &)
     66>          ]
     67}}}
     68
     69==== Solution ====
     70
     71Inherit your class from ```QObject```.
     72
    4373== Varia ==
    4474