[Qt-interest] Qt-Creator problem : collect2: ld returned 1 exit status

yogesh upreti yogesh.upreti at gmail.com
Thu Apr 8 23:48:19 CEST 2010


Dear Group,
I am using Qt-creator to write a simple code. My code contains gif and jpeg
files as icons and background. I want to compile a static exe with gif and
jpeg plugin included inside.
here is my main.cpp

#include <QtGui/QApplication>

#include <QtPlugin>

Q_IMPORT_PLUGIN(qjpeg)

Q_IMPORT_PLUGIN(qgif)

Q_IMPORT_PLUGIN(qtiff)

 int main(int argc, char *argv[])

{

QCoreApplication::addLibraryPath("plugins");

QApplication a(argc, argv);

caeBrowser w;

w.show();

return a.exec();

}


and .pro file


QT += xml

TARGET = cae_browser

TEMPLATE = app

SOURCES += main.cpp \

caebrowser.cpp

HEADERS += caebrowser.h

FORMS += caebrowser.ui

RESOURCES += images.qrc

CONFIG += static

QTPLUGIN += qjpeg qgif qtiff


when ever I try to import jpeg or gif plugin I get a compile time error
message. :


g++ -enable-stdcall-fixup -Wl,-enable-auto-import
-Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o
debug/cae_browser.exe debug/main.o debug/caebrowser.o debug/moc_caebrowser.o
debug/qrc_images.o -L'c:/Qt/2009.02/qt/lib' -lmingw32 -lqtmaind
-LC:/Qt/2009.02/qt/plugins/imageformats -lqjpegd -lqgifd -lqtiffd -lQtXmld4
-lQtGuid4 -lQtCored4

C:\Qt\2009.02\mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:
cannot find -lqjpegd

collect2: ld returned 1 exit status

mingw32-make.exe[1]: Leaving directory
`F:/Work/Programming/QT/Solution_Browser/cae_browser'

C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Leaving directory
`F:/Work/Programming/QT/Solution_Browser/cae_browser'

mingw32-make.exe[1]: *** [debug/cae_browser.exe] Error 1

C:\Qt\2009.02\mingw\bin\mingw32-make.exe: *** [debug] Error 2

Exited with code 2.

Error while building project cae_browser

When executing build step 'Make'



Can somebody help me with this ?? or is there any other way to use gif files
with application?


Thanks and Regards

Yogesh Upreti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100408/51c98e67/attachment.html 


More information about the Qt-interest-old mailing list