PDA

View Full Version : Deployment problem on qt 4.5 windows



brasio
8th April 2009, 13:08
Hi all,
I have created a simple GUI application with QTCreator, no plugins. If it runs inside Qtcreator it works, but if I try to distribute it I have error.
In details I put in a folder the following files:

myapplication.exe
mingwm10.dll
QtCore4.dll
QtGui4.dll

and launch myapplication.exe.

The error is something like "it is not possible to find the entry point in QtCore4.dll"

QT has been installed in default mode (no static configuration).

What's wrong?
Thanks

brasio
15th April 2009, 10:38
Anybody with this problem?
Do I make any error?

mdicosimo
20th April 2009, 23:39
Anybody with this problem?
Do I make any error?

I do have the same problem!
Have you been able to find the cause, then?

I found out that the error disappears if I use dlls from QT4.4.3 that I also have on my machine.
So I asked to myself if, in some way, I had messed up things and had linked against 4.4.3;
to clarify the doubt I used QT_VERSION_STR inside my application and it confirmed that it was compiled against 4.5.
With qVersion() it confirmed that inside QtCreator it runs under QT4.5 and outside it starts only under QT4.4.3

What is happening??

Max

jpn
21st April 2009, 11:29
Qt is only backwards binary compatible. You can run applications built with and older Qt versions against a newer Qt version, but not the vice versa. The Qt library is being developed all the time, a newer Qt version naturally contains more exported symbols than the older one does. If you build an application against a new Qt version, it cannot be run against an old Qt version which doesn't contain all the symbols the new Qt version had.

brasio
21st April 2009, 11:37
I have only qt 4.5 open source on my pc. Previous version has been uninstalled.

mdicosimo
21st April 2009, 12:41
I apologize for being so confusing. Situation is as follows:

I'm under Windows XP and I created with QtCretor a simple Dialog with only two lineEdit fields. I use inside application:
- QT_VERSION_STR macro to ask to application which Qt version it has been compiled against;
- qVersion() to ask to application which Qt version it is running under.

1) When launched from inside QtCreator my application starts normally and:
- QT_VERSION_STR returns "4.5.0"
- qVersion() returns "4.5.0"
So everything is as expected.

2) I put my executable in a new folder with QtCore4.dll and QtGui4.dll (version 4.5) and application doesn't start!!! It gives an error about a procedure entry point not found in QtCore4.dll.

3) I put my executable in a new folder with QtCore4.dll and QtGui4.dll (version 4.4.3) and application runs!!!
- QT_VERSION_STR returns "4.5.0"
- qVersion() returns "4.4.3"

So my question is why it works fine under QtCreator and it doesn't with Qt 4.5 libraries.

Max

jpn
21st April 2009, 14:05
Max, just to ensure, you did compile them all with same compiler, did you? I mean, there's no MSVC vs. MinGW mixup, right?

mdicosimo
21st April 2009, 14:21
Max, just to ensure, you did compile them all with same compiler, did you? I mean, there's no MSVC vs. MinGW mixup, right?

I don't have Visual Studio installed.

Do you know if it is possible to see the execute command that QtCreator uses to launch my applications? I would like to know exactly path, folder, environment, etc etc

Thank you.

Max

brasio
24th April 2009, 17:43
Did you find the problem?
I still cannot find a solution.

mdicosimo
25th April 2009, 05:16
Did you find the problem?
I still cannot find a solution.

Hi, I've just come to the solution!!!
I'm going to explain below: I hope it will be useful for you.

When I installed the new Qt 4.5 bundle that includes QtCreator, the setup program created the folder D:\Qt\2009.01 and put everything there (please note that the default drive was C but I chose to change it).
Inside that folder you can find the following two folders (among others):
D:\Qt\2009.01\bin
D:\Qt\2009.01\qt\bin
Both of them contain QtCore4.dll and QtGui4.dll files.
It seems that the correct files are in the second one (D:\Qt\2009.01\qt\bin).
My mistake was that I got the files in the first one.

Max

brasio
27th April 2009, 16:53
Same mistake for me.
Thanks, it works!:)

HyperB
8th May 2009, 20:31
The problem here is that the binaries under Qt\bin are compiled with MSVC but the binaries under Qt\qt\bin are compiled with mingw.

According to email from Qt - this is by design! Be carefull...

LoomVortex
3rd September 2009, 09:46
Hi, I've just come to the solution!!!
I'm going to explain below: I hope it will be useful for you.

When I installed the new Qt 4.5 bundle that includes QtCreator, the setup program created the folder D:\Qt\2009.01 and put everything there (please note that the default drive was C but I chose to change it).
Inside that folder you can find the following two folders (among others):
D:\Qt\2009.01\bin
D:\Qt\2009.01\qt\bin
Both of them contain QtCore4.dll and QtGui4.dll files.
It seems that the correct files are in the second one (D:\Qt\2009.01\qt\bin).
My mistake was that I got the files in the first one.

Max

Wow.. that´s it! Thanks a lot! :cool:

yyiu002
23rd June 2010, 04:10
I had the same problem, I have tried copy all QTCore4.dll on my computer to my exe folder, still get non found entry point in QTCore4.dll.

It frustrating for me nearly 2 hours!

It used to run ok, only change I did was to try to use TCP/IP connection, tried copy QtNetwork4.dll to exe folder.

Finally found why? I copied wrong "QtNetwork4.dll".

But why complain non entry point on QTCore4.dll instead of "QtNetwork4.dll". Strange though!!

BitMaster
26th June 2010, 00:05
You probably should use the QTCore4.dll (and others) from the qt\bin subdirectory (not just from the bin folder). I also had this problem, but i searched the QT directory tree for QTCore4.dll and i found 2 versions (one slightly bigger). The other one worked ;)

edit: lol, didn't see the other post. srry :rolleyes: