title: Linking Matlab shared library into Qt (Windows)
body: <p>I want to use Matlab's C API within QT (http://www.mathworks.com/help/techdoc/matlab_external/f39876.html#bsfvqhp-1) under Windows for opening a .mat file. In my .pro file I have included 
  <code>INCLUDEPATH += "C:\Program Files\MATLAB\R2010b\extern\include"</code> 
  which works fine (the code compiles). But when trying to link the libmat.lib file (I have read the .dll files cannot be linked directly) using 
  <code>LIBS += -L"C:\Program Files\MATLAB\R2010b\extern\lib\win32\microsoft" -llibmat</code> 
  the application crashes on execution. The error given says <code>[file].exe exited with code -1073741515</code></p>
  
  <p>I'm neither a QT nor a Windows expert but for this project I am forced to use both (I guess it would be easier to fix this in GNU/Linux) so any help would be appreciated. Using Windows XP, QT version 4.7.0 with Qt Creator 2.0.1, and Matlab R2010b.</p>
  
  <p>The last output from the compiler just in case it is useful:<br /><br />
  <code>g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug/MainUI.exe debug/main.o debug/maingui.o debug/matparser.o debug/matutils.o debug/moc_maingui.o  -L'c:/Qt/2010.05/qt/lib' -lmingw32 -lqtmaind "-LC:\Program Files\MATLAB\R2010b\extern\lib\win32\microsoft" -llibmat -lQtGuid4 -lQtCored4</code></p>