Why can't g ++ find / link to qjpeg4.dll?

Using Qt Creator 2.4.1 (Windows / mingw), I am trying to compile my project dynamically linked to some Qt image plugins (i.e. those that are in C:\QtSDK\Desktop\Qt\4.8.1\mingw\plugins\imageformats\). In the .pro file:

QTPLUGIN += qjpeg qgif qico qtiff

This is mistake:

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

c:/qtsdk/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lqjpeg

In the above example, you can see the -LC:\QtSDK\Desktop\Qt\4.8.1\mingw\plugins/imageformatsindicated before -lqjpegand C:\QtSDK\Desktop\Qt\4.8.1\mingw\plugins\imageformats\qjpeg4.dll, ... so what gives?

Additional information: I can comment on the line QTPLUGINin the .pro file and put instead:

LIBS += -LC:\\QtSDK\\Desktop\\Qt\\4.8.1\\mingw\\plugins\\imageformats -l:qjpeg4.dll

These links are successful, but I'm more interested in why it QTPLUGINappears out of the box under Windows mingw. What am I missing?

+3
source share

All Articles