I've re-configured and re-built (make sub-src) my Qt4.3.1 OpenSource edition for Windows with the options that were listed above.
I got no errors, no warning.
Here is my .pro file :
TEMPLATE = app
TARGET = Listeur
QT += core \
gui \
network
HEADERS += Thread_existing_files.h \
Thread_HTTP_VC.h \
Thread_HTTP_MC.h \
Thread_HTTP_AC.h \
Thread_HTTP_QLCS.h \
Listeur.h \
Thread_scanneur.h \
donnee.h \
interface.h \
interface_impl.h
SOURCES += Thread_existing_files.cpp \
Thread_HTTP_VC.cpp \
Thread_HTTP_MC.cpp \
Thread_HTTP_AC.cpp \
Thread_HTTP_QLCS.cpp \
Listeur.cpp \
Thread_scanneur.cpp \
donnee.cpp \
interface_impl.cpp \
main.cpp
FORMS += interface.ui
QTPLUGIN += qgif \
qjpeg
TEMPLATE = app
TARGET = Listeur
QT += core \
gui \
network
HEADERS += Thread_existing_files.h \
Thread_HTTP_VC.h \
Thread_HTTP_MC.h \
Thread_HTTP_AC.h \
Thread_HTTP_QLCS.h \
Listeur.h \
Thread_scanneur.h \
donnee.h \
interface.h \
interface_impl.h
SOURCES += Thread_existing_files.cpp \
Thread_HTTP_VC.cpp \
Thread_HTTP_MC.cpp \
Thread_HTTP_AC.cpp \
Thread_HTTP_QLCS.cpp \
Listeur.cpp \
Thread_scanneur.cpp \
donnee.cpp \
interface_impl.cpp \
main.cpp
FORMS += interface.ui
QTPLUGIN += qgif \
qjpeg
To copy to clipboard, switch view to plain text mode
Here is my main.cpp :
#include "Listeur.h"
#include <QtPlugin>
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
int main(int argc, char *argv[])
{
Listeur * mon_listeur = new Listeur();
return app.exec();
}
#include "Listeur.h"
#include <QtPlugin>
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Listeur * mon_listeur = new Listeur();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
When I build my application, using "qmake" an "make", I get the following error message :
D:\Applications\Qt\4.3.1\Workspace\Listeur>qmake
D:\Applications\Qt\4.3.1\Workspace\Listeur>make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `D:/Applications/Qt/4.3.1/Workspace/Listeur'
g++ -c -O2 -Wall -fno-exceptions -fno-rtti -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT
_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_N
EEDS_QMAIN -I"..\..\include\QtCore" -I"..\..\include\QtCore" -I"..\..\include\Qt
Network" -I"..\..\include\QtNetwork" -I"..\..\include\QtGui" -I"..\..\include\Qt
Gui" -I"..\..\include" -I"..\..\include\ActiveQt" -I"tmp\moc\release_static" -I"
." -I"..\..\mkspecs\win32-g++" -o tmp\obj\release_static\main.o main.cpp
main.cpp: In function `int qMain(int, char**)':
main.cpp:15: warning: unused variable 'mon_listeur'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -Wl,-subsystem,windows -o "release\Listeur.exe" object_script.Listeur.
Release -L"d:\Applications\Qt\4.3.1\lib" -L"d:\Applications\Qt\4.3.1\lib" -lmin
gw32 -lqtmain -LD:/Applications/Qt/4.3.1/plugins/imageformats/ -lqgif4 -LD:/Appl
ications/Qt/4.3.1/plugins/imageformats/ -lqjpeg4 -lQtGui -lQtNetwork -lgdi32 -lc
omdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCore -lkernel32 -lus
er32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
./tmp\obj\release_static\main.o(.text+0x83):main.cpp: undefined reference to `qt
_plugin_instance_qjpeg()'
./tmp\obj\release_static\main.o(.text+0xa3):main.cpp: undefined reference to `qt
_plugin_instance_qgif()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\Listeur.exe] Error 1
mingw32-make[1]: Leaving directory `D:/Applications/Qt/4.3.1/Workspace/Listeur'
mingw32-make: *** [release] Error 2
D:\Applications\Qt\4.3.1\Workspace\Listeur>
D:\Applications\Qt\4.3.1\Workspace\Listeur>qmake
D:\Applications\Qt\4.3.1\Workspace\Listeur>make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `D:/Applications/Qt/4.3.1/Workspace/Listeur'
g++ -c -O2 -Wall -fno-exceptions -fno-rtti -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT
_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_N
EEDS_QMAIN -I"..\..\include\QtCore" -I"..\..\include\QtCore" -I"..\..\include\Qt
Network" -I"..\..\include\QtNetwork" -I"..\..\include\QtGui" -I"..\..\include\Qt
Gui" -I"..\..\include" -I"..\..\include\ActiveQt" -I"tmp\moc\release_static" -I"
." -I"..\..\mkspecs\win32-g++" -o tmp\obj\release_static\main.o main.cpp
main.cpp: In function `int qMain(int, char**)':
main.cpp:15: warning: unused variable 'mon_listeur'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -Wl,-subsystem,windows -o "release\Listeur.exe" object_script.Listeur.
Release -L"d:\Applications\Qt\4.3.1\lib" -L"d:\Applications\Qt\4.3.1\lib" -lmin
gw32 -lqtmain -LD:/Applications/Qt/4.3.1/plugins/imageformats/ -lqgif4 -LD:/Appl
ications/Qt/4.3.1/plugins/imageformats/ -lqjpeg4 -lQtGui -lQtNetwork -lgdi32 -lc
omdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCore -lkernel32 -lus
er32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
./tmp\obj\release_static\main.o(.text+0x83):main.cpp: undefined reference to `qt
_plugin_instance_qjpeg()'
./tmp\obj\release_static\main.o(.text+0xa3):main.cpp: undefined reference to `qt
_plugin_instance_qgif()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\Listeur.exe] Error 1
mingw32-make[1]: Leaving directory `D:/Applications/Qt/4.3.1/Workspace/Listeur'
mingw32-make: *** [release] Error 2
D:\Applications\Qt\4.3.1\Workspace\Listeur>
To copy to clipboard, switch view to plain text mode
I don't understand how to solve this linking error :s
Bookmarks