PDA

View Full Version : QtWebKit: compiles/builds fine but I cannot execute (.dll missing)



fatecasino
1st April 2011, 04:06
Hi all,
I am trying to transfer a full functioning project from linux to windows.
I am very new to windows architecture.
The project compiles and builds fine.
Then when I try to execute I get some missing .dll files
QtWebKit4.dll
QtWebKitd4.dll
QtNetwork.dll
QtNetworkd.dll
Qt4Core4.dll
Qt4Cored4.dll
QtGui4.dll
QtGuid4.dll

Obviously there is something I haven's configured well :(((

my .pro file is like this:



TARGET = asta
TEMPLATE = app
TARGET = asta
DEPENDPATH += .
INCLUDEPATH += .
QT += core gui



# Input
SOURCES += \
main.cpp \
my2dPlot.cpp \
testObject.cpp \
menuBar.cpp \
mainwindow.cpp \
t4.cpp \
qwt_double_rect.cpp \
plotPicker.cpp \
groupBox.cpp \
myTable.cpp \
myTableItem.cpp \
myLineEdit.cpp \
cell.cpp \
parametermodel.cpp \
comboboxDelegates.cpp \
mysplash.cpp \
internetbrowser.cpp \
pictureflow.cpp \
spinboxdelegates.cpp \
configdialog.cpp \
pages.cpp

HEADERS += \
my2dPlot.h \
testObject.h \
menuBar.h \
mainwindow.h \
pixmaps.h \
t4.h \
qwt_double_rect.h \
qwt_array.h \
plotPicker.h \
groupBox.h \
myTable.h \
myTableItem.h \
MyLineEdit.h \
cell.h \
parametermodel.h \
comboboxDelegates.h \
mysplash.h \
internetbrowser.h \
pictureflow.h \
spinboxdelegates.h \
configdialog.h \
pages.h

QT += webkit
QT +=opengl
QT +=network
CONFIG +=qwt

CONFIG += debug_and_release
CONFIG += build_all

INCLUDEPATH += C:\Qt\qwt-6.0.0-rc5\src
LIBS += C:\Qt\qwt-6.0.0-rc5\lib\libqwt.a
LIBS += C:\Qt\qwt-6.0.0-rc5\lib\libqwtd.a


OTHER_FILES += iconDatabase.txt

FORMS += itemdl.ui \


even if I copy all these .dlls in the folder of the executable I get an error like

Microsoft Visual C++ Runtime...
"This application has requested the runtime to terminate it in an unusual way..."

tbscope
1st April 2011, 05:19
Try using the depency walker (see MSDN), this program will tell you which dependencies are not available.

Note that if you use a Qt plugin DLL like an image formate decoder than you must install that too in the correct place.

Archa4
1st April 2011, 08:19
Hm... Does it really request the -d files (QtWebKitd4.dll, QtNetworkd.dll) if u created a release version, then u shouldn't need these (or am I missing something)?

fatecasino
1st April 2011, 20:14
I compiled and executed successfully the same project by removing all QtWebKit-related classes.
This means that probably I haven't set up well Qt or something.
Any ideas?

@Archa4 : I had just enabled the release and debug mode.

Zlatomir
1st April 2011, 20:27
What Archa4 tried to say is that you won't need to deploy the d dll's (anyway the debug version of the VC++ run time is almost impossible to "install" (deploy) on a system without VS installed)

Which Visual Studio version are you using? The Qt framework dll's need to be built with the same VS version as your application, so make sure you install the correct Qt built, and if you use VS 2010 you need to build Qt yourself else you might get run time errors.

fatecasino
2nd April 2011, 04:01
hi,
I am using Qt 4.7.0 (32 bit) but I didn't use Visual Studio at all. I am actually a really newbie to windows architecture and libraries. I followed the instructions and installed Qt with MinGw. Then I tried to transfer my project from linux to windows. I had some troubles to install Qwt and Qxt but in the end I did it. Qt seemed to build, compile and execute flawlessly. Now some part of my project has QtWebKit. The classes and functions appear to work too, the project compiles fine, but when I try to execute the program I get errors having some .dll missing. Do I have to install VS to make QtWebKit work?

About the d dll's you are absolutely right, they are not necessary for the release mode. However when I try to execute the release .exe I get something like:
_ZN11WebElement12appendInsideERK7QString ,.... was not found in the QtWebKit4.dll
Then I copy the QtWebKit4.dll in the folder and I get the similar error:
_Z11qWinAppInstv.. was not found in QtCore4.dll
Then I copy the QtCore4.dll in the release folder and I get:
??0QPointF@@QAE@NN@Z could not be found in QtCore4.dll

My imagination stopped there because I could get through it.
What is the diagnosis? Is it my Qt/windows installation? or should I do something else like adding a environmental variable, adding something to the .pro file, etc,etc?

ChrisW67
2nd April 2011, 04:16
Make sure you are copying the correct set of DLLs from your installation for deployment. If you are using the Qt SDK bundle then you want the files from:


{SDKDIR}/qt/bin
e.g.
C:/Qt/2010.02.1/qt/bin
which have been built the bundled MingW compiler. The files from:


{SDKDIR}/bin
e.g.
C:/Qt/2010.02.1/bin

were built with MSVC to provide the runtime for Qt Creator and you do not want these.

fatecasino
4th April 2011, 22:27
well, indeed, these
_ZN11WebElement12appendInsideERK7QString .dll errors,
were because wrong path was set to the environmental variables. The right one is

C:/Qt/2010.02.1/bin
I don't have any more dll missing messages, BUT,
I get a general runtime error

"This application has requested the Runtime to terminate it in an unusual way,bla,bla"

I copied all the dll it asked but stil does not work.

phonon4.dll
QtWebKit4.dll
QtNetwork.dll
Qt4Core4.dll
QtGui4.dll

The thing is that if I remove the QtWebKit and all its class/function instances from the program, the executables works as a charm,

what is the problem?!

ChrisW67
4th April 2011, 22:39
Did you read my last post?

fatecasino
4th April 2011, 23:50
it was a stupid typo of me!
I meant to write that I set the path to:

C:/Qt/2010.02.1/qt/bin
I copied these .dll files everywhere around the project but I get the error message of my previous post.
It seems like the copied.dlls are correct but something crashes the execution of the program(runtime error).

ChrisW67
5th April 2011, 04:10
Whatever code you are removing to disable the program's use of WebKit obviously contains the problem then. Probably a NULL/dangling pointer or a reference to a variable that goes out of scope. If you cannot reproduce it in a debugger (you should be able to) then it is time to add bits of the functionality back in until the break reappears.