<div dir="ltr"><div><div><div><div>I give up!<br><br></div>Once I figured out how to add the stupid haptics stuff into the .pro file I then get errors on my main when I try to compile:<br></div><br>error: undefined reference to `SailfishApp::application(int&, char**)'<br>error: undefined reference to `SailfishApp::createView()'<br>error: undefined reference to `SailfishApp::pathTo(QString const&)'<br><br></div>I have used this kind of code succesfully in my other app and no issue there.<br><br></div>Any help would be much appreciated.<br><br>My main looks like this:<br><br><span style="color:rgb(0,0,128)">#ifdef</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">QT_QML_DEBUG</span>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><QtQuick></span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,128)">#endif</span></pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><sailfishapp.h></span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><rumbler.h></span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><QQuickView></span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><QQmlContext></span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><QGuiApplication></span></pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">main</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">argc</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">char</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(0,0,0)">argv</span><span style="color:rgb(0,0,0)">[])</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,0)">{</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">SailfishApp::main()</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">will</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">display</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"qml/template.qml",</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">if</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">you</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">need</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">more</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">control</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">over</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">initialization,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">you</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">can</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">use:</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)">   </span><span style="color:rgb(0,128,0)">-</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">SailfishApp::application(int,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">char</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">*[])</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">get</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">QGuiApplication</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">*</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)">   </span><span style="color:rgb(0,128,0)">-</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">SailfishApp::createView()</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">get</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">a</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">new</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">QQuickView</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">instance</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)">   </span><span style="color:rgb(0,128,0)">-</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">SailfishApp::pathTo(QString)</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">get</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">a</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">QUrl</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">a</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">resource</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">file</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">To</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">display</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">view,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">call</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"show()"</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">(will</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">show</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">fullscreen</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">on</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">device).</span></pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">SailfishApp::main(argc,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">argv);</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">QScopedPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">QGuiApplication</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">app</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">SailfishApp</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">application</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">argc</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">argv</span><span style="color:rgb(0,0,0)">));</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">QScopedPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">QQuickView</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">view</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">SailfishApp</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">createView</span><span style="color:rgb(0,0,0)">());</span></pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">Rumbler</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">rumbler</span><span style="color:rgb(0,0,0)">;</span></pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">view</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">rootContext</span><span style="color:rgb(0,0,0)">()-></span><span style="color:rgb(0,0,0)">setContextProperty</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,128,0)">"Rumbler"</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">&</span><span style="color:rgb(0,0,0)">rumbler</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">view</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">setSource</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">SailfishApp</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">pathTo</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,128,0)">"qml/harbour-myapp.qml"</span><span style="color:rgb(0,0,0)">));</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">view</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">show</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">view</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">showFullScreen</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">app</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">exec</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,0)">}</span></pre>
<pre style="margin:0px;text-indent:0px"><br></pre><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><br>// Peter Pykäläinen</div></div>
<br><div class="gmail_quote">On 1 December 2014 at 15:08, Andrey Kozhevnikov <span dir="ltr"><<a href="mailto:coderusinbox@gmail.com" target="_blank">coderusinbox@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    I can suggest you to use QtFeedback from Qt side and register QML
    type.<br>
    <br>
    <div>01.12.2014 18:06, Peter Pykäläinen
      пишет:<br>
    </div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>
          <div>
            <div><span><span>Just got my game rejected in Jolla
                  Harbour this morning due to:<br>
                  <i>Import 'QtFeedback 5.0' is not allowed<br>
                    <br>
                  </i></span></span></div>
            <span><span>Is it really so that vibration is not
                allowed in Harbour apps?<br>
              </span></span></div>
          <span><span></span></span>Is there any alternative?<br>
        </div>
        <span><span></span></span>
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div><br>
                    // Peter Pykäläinen</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a></pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br></blockquote></div><br></div>