title: Why can't g++ find/link to qjpeg4.dll?
body: <p>Using Qt Creator 2.4.1 (Windows/mingw), I'm trying to compile my project dynamically linking with some Qt image plugins (i.e. the ones in <code>C:\QtSDK\Desktop\Qt\4.8.1\mingw\plugins\imageformats\</code>). In the .pro file:</p>
  
  <p><code>QTPLUGIN += qjpeg qgif qico qtiff</code></p>
  
  <p>This is the error:</p>
  
  <p><code>g++ -Wl,-s -mthreads -Wl,-subsystem,windows -o release\myproject.exe object_script.myproject.Release  -L"c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib" -lmingw32 -lqtmain release\myproject_res.o -L. -lswscale-2 -lavcodec-54 -lavdevice-53 -lavfilter-2 -lavformat-54 -lavutil-51 -lusb -lPsapi -lasa047 -lsphinxbase -lpocketsphinx -LC:\QtSDK\Desktop\Qt\4.8.1\mingw\plugins/imageformats -lqjpeg -lqgif -lqico -lqtiff -lQtMultimedia4 -lQtGui4 -lQtNetwork4 -lQtCore4</code></p>
  
  <p><code>c:/qtsdk/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lqjpeg</code></p>
  
  <p>In the above you can see <code>-LC:\QtSDK\Desktop\Qt\4.8.1\mingw\plugins/imageformats</code> specified before <code>-lqjpeg</code> and <code>C:\QtSDK\Desktop\Qt\4.8.1\mingw\plugins\imageformats\qjpeg4.dll</code> exists ... so what gives?</p>
  
  <p>Additional info: I can comment out the <code>QTPLUGIN</code> line in the .pro file and put instead:</p>
  
  <p><code>LIBS += -LC:\\QtSDK\\Desktop\\Qt\\4.8.1\\mingw\\plugins\\imageformats -l:qjpeg4.dll</code></p>
  
  <p>This links successfully, but I'm more interested in why <code>QTPLUGIN</code> appears broken out of the box under Windows mingw. What am I missing?</p>