title: How to use LibVLC with Qt 5
body: <p>I'm trying to use LibVLC in a Qt 5 program to open a VLC instance and play a video. 
  The following code comes from <a href="https://wiki.videolan.org/LibVLC_Tutorial/" rel="nofollow">https://wiki.videolan.org/LibVLC_Tutorial/</a>
  I'm using Linux.</p>
  
  <p>.pro : </p>
  
  <pre><code>TEMPLATE = app
  TARGET = projectLoic
  INCLUDEPATH += . vlc
  QT += widgets
  # Input
  HEADERS += 
  SOURCES += main.cpp
  LIBS +=-lvlc
  </code></pre>
  
  <p>main : </p>
  
  <pre><code>#include &lt;vlc/vlc.h&gt;
  #include &lt;QApplication&gt;
  
  int main(int argc, char* argv[])
  {
      QApplication app(argc, argv);
  
  
      libvlc_instance_t * inst;
      libvlc_media_player_t *mp;
      libvlc_media_t *m;
  
           // Load the VLC engine
           inst = libvlc_new(0, NULL);
  
           // Create a new item
  
           m = libvlc_media_new_path (inst, "/home/........mp3");
  
           // Create a media player playing environement
           mp = libvlc_media_player_new_from_media (m);
  
           // play the media_player
           libvlc_media_player_play (mp);
  
       return app.exec();
  }
  </code></pre>
  
  <p>The compilation is fine. But the program immediatly crashes when I build it (with Qt Creator). Any idea?</p>
  
  <p>Many thanks</p>