I'm new of this forum.
I try to compile a project made by an other one. I've installed QT Creator 2.0.1 and mingw 4.5.2 to build it.
I obtained this error messages:
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lQtXml4
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lQtGui4
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lQtCore4
How can I manage this?
Do you have set " QT += xml" in the pro file?
Thanks. Yes, I've set.
bq. I try to compile a project made by an other one. I’ve installed QT Creator 2.0.1 and mingw 4.5.2 to build it.
Have you installed Qt?
I've download "Qt SDK for Windows" from Qt site. I try to make a test project with a window and work but for that project I can't build.
I've to install some others things?
Did you execute qmake again after setting "QT += xml” in the pro file?
"QT += xml" was originally written in the pro file.
this is what I've done:
- install the QT SDK
- install mingw
- run configure.exe under "C:\Qt\2010.05\qt"
- open project
- build->run qmake and it return this messages:
Starting: "c:/qt/2010.05/qt/bin/qmake.exe" C:/Develop/TEST/J6PROJ/J6PROJ.pro -r -spec win32-g++ c:\Qt\2010.05\qt\bin\rcc.exe: File does not exist '..\J6PROJ.qrc'
c:\Qt\2010.05\qt\bin\rcc.exe: File does not exist '..\J6PROJ.qrc'
The process "c:/qt/2010.05/qt/bin/qmake.exe" exited normally.
And this warning:
Qmake does not support build directories below the source directory
- After that I build project build->Build Project and obtain that errors.
it's not the "QT += xml" if the linker does not find the libs.
can you please post your pro file content?
Why do you run configure.exe if you don't build qt? It overwrites some files that are used by qmake...
Also, I think the sdk brings a mingw by itself, right?
Here the pro file:
Project created by QtCreator 2009-07-02T09:25:39
QT += xml
TARGET = MNCF
TEMPLATE = app
DEPENDPATH += .
INCLUDEPATH += ./COM
INCLUDEPATH += ./DIO
QMAKE_LIBDIR += ../COM
QMAKE_LIBDIR += ../DIO
SOURCES += main.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
OTHER_FILES += big
RESOURCES += J6PROJ.qrc
LIBS += -lqextserialport
LIBS += -lEIODll
unix:DEFINES = TTY_POSIX
win32:DEFINES = TTY_WIN
win32:RC_FILE = app.rc
Your steps 2 and 3 (installing mingw and running configure) are likely the cause of your problems. The SDK installer sets it all up for you, ready to use. I would re-install the SKD; that would be quicker than trying to fix the issue manually I think.
Thanks Andre and Gerolf. I try to unistall and reinstall the SDK and test.
as you use ui stuff, you should have this in the beginning:
QT += core gui xml
By default, QT already has at least core (and I believe gui too). So just
QT += xml
should be enough.
IMO, this sounds like the path doesn't contain the route to the libraries, so they aren't being found. If this is the case, maybe using -Lfulllibroute instead of -llibname could be useful (-L full lib route, -l library name). Also, I don't know which $PATH(s) mingw's ld looks into...
I've uninstall Qt sdk and minigw and reinstall only Qt sdk.
I've load my project, run qmake and build project obtaining a lot of error like:
_undefined reference to
__gxx_personality_sj0'_ _undefined reference toUnwind_SjLj_Register'
_undefined reference to
_Unwind_SjLj_Unregister'_ _undefined reference toUnwind_SjLj_Resume'
It seems like a non correct library link.
After such a tremendous software removal and reinstallation... a full clean build is recommended, IMHO.
I've done it but I obtained the same errors.
I have reinstalled the Qt SDK and after compile my project I obtained this errors:
./release\moc_mainwindow.o:moc_mainwindow.cpp:(.text+0xb7): undefined reference to `__gxx_personality_sj0'
./release\moc_mainwindow.o:moc_mainwindow.cpp:(.text+0xca): undefined reference to `_Unwind_SjLj_Register'
./release\moc_mainwindow.o:moc_mainwindow.cpp:(.text+0x113): undefined reference to `_Unwind_SjLj_Unregister'
./release\moc_mainwindow.o:moc_mainwindow.cpp:(.text+0xa76): undefined reference to `_Unwind_SjLj_Resume'
for each file.
How can manage this? Which library contain that reference?
Ok, I've done it.
I've installed the SDK that the project was made, 2009.03, and with this the project compile correctly.
2 years ago... too many changes in Qt since that moment in time? Couldn't say, as i recently joined this page...