title: Porting Qwt library to playbook
body: <p>I am new to Qt, cross compiling and porting so please bear with me.</p>
  
  <p>My goal is to use the <a href="http://qwt.sourceforge.net/" rel="nofollow">Qwt library</a> on Playbook OS for a Qt based application. I found a nice tutorial on <a href="http://hecgeek.blogspot.com/2011/10/qt-for-blackberry-playbook.html" rel="nofollow">Qt for Blackberry Playbook</a> and I managed to get a simple Qt "Hello World" application running on my tablet.</p>
  
  <p>My next step was to build the Qwt library and make use of it in my application. I spent some time reading about qmake and I built the library along with an application with no problems but when I run the application it crashes as soon I launch it.</p>
  
  <p>Here are the steps that I took in building both the library and my app:</p>
  
  <ol>
  <li>Downloaded the source for Qwt and used the qmake that comes with the <a href="https://github.com/blackberry/Qt" rel="nofollow">RIM's Qt port</a>. For reference: when installing the Qt port it will create a <strong>"stage"</strong> directory and the qmake is located here: <code>~/stage/nto/armle-v7/usr/lib/qt4/bin/qmake</code>. First I've got an error about the designer plugin, but after turning the designer switch off, it compiled with no errors or warnings.</li>
  <li>I have built one of the samples that come with Qwt. I only added on line in the code (based on tutorial instructions): <code>QCoreApplication::addLibraryPath("app/native/lib");</code>. This is needed to tell the application where at run time are the shared libraries located on the device. No problems here either. My .pro file looked as follows:</li>
  </ol>
  
  <p>include( $${PWD}/../examples.pri )</p>
  
  <pre><code>TARGET  = curvdemo1    
  DESTDIR = . 
  
  QMAKE_LFLAGS += '-Wl,-rpath,\'./app/native/lib\''
  LIBS += -lbbsupport
  
  SOURCES = \    
      curvdemo1.cpp    
  
  package.target = $${TARGET}.bar
  package.depends = $$TARGET
  package.commands = blackberry-nativepackager \
      -devMode \
      -package $${TARGET}.bar -arg -platform -arg blackberry \
      blackberry-tablet.xml $$TARGET \
      -e icon.png res/icon.png \
      -e splashscreen.png res/splashscreen.png \
      -e $$[QT_INSTALL_LIBS]/libQtCore.so.4 lib/libQtCore.so.4 \
      -e $$[QT_INSTALL_LIBS]/libQtGui.so.4 lib/libQtGui.so.4 \
      -e $$[QT_INSTALL_LIBS]/libQtOpenGL.so.4 lib/libQtOpenGL.so.4 \
      -e $$[QT_INSTALL_LIBS]/libQtNetwork.so.4 lib/libQtNetwork.so.4 \
      -e $$[QT_INSTALL_LIBS]/libbbsupport.so.4 lib/libbbsupport.so.4 \
      -e $$[QT_INSTALL_PLUGINS]/platforms/libblackberry.so lib/platforms/libblackberry.so
      -e /home/builder/Qwt/qwt-6.0.1/lib/libqwt.so.6 lib/libqwt.so.6 \
      -e /home/builder/Qwt/qwt-6.0.1/lib/libqwtmathml.so.6 lib/libqwtmathml.so.6 
  
  QMAKE_EXTRA_TARGETS += package
  </code></pre>
  
  <p>I packaged the app and deployed it, however when running the application crashes as soon as the splashscreen disappears.</p>
  
  <p>The steps listed above are referring to my attempt of using the Qwt as a shared library. I did try building it as a static library by removing <code>QwtDll</code> as per library instructions, but the final result is the same. I can tell that the binary makes use of static libs based on its size.</p>
  
  <p>With my little knowledge I can assume that the Qwt library was not properly built and cannot be loaded properly by my test app. If so how to properly port this library to Playbook OS? If not what else am I missing along these steps?</p>
  
  <p>BTW I can't use Momentics to debug for the time being (for other reasons).</p>
  
  <p>Thank you in advance for your contribution to my learning experience.</p>