PDA

View Full Version : Adding Qt to Path not working



afflictedd2
31st January 2011, 15:35
Hi everyone,

I am trying to run an application I built in
Qt, but I get the following error:

The procedure entry point _Z17qt_message_output9QtMsgTypePKc
could not be located in the dynamic link library QtCore4.dll

From what I have read in other threads this hsouldn't be a problem if
you have Qt added to your environment path.
Which I have for both my user and system path variable:

user path: ...;...;...;C:\Qt\2010.05\qt\bin
system path: ...;...;...;C:\Qt\2010.05\qt\bin

I do not understand why I am still getting this error, how can
I fix this.

Any help appreciated,

Ted

Lykurg
31st January 2011, 15:47
It should be C:\Qt\2010.05\qt\src\bin.

afflictedd2
31st January 2011, 19:51
That directory does not exist in my computer :\

Ted.

Lykurg
31st January 2011, 21:13
have you downloaded the SDK or only the libraries? If the later is true, then make sure you have downloaded the right ones for your compiler.

afflictedd2
2nd February 2011, 19:16
Yeah I just installed the windows SDK to make sure. That path does not exist. The paths I see are:

C:\Qt\2010.05\bin
C:\Qt\2010.05\qt\bin
C:\Qt\2010.05\qt\src


but there is no C:\Qt\2010.05\qt\src\bin

Ted

Lykurg
2nd February 2011, 20:07
Oh my God! I am very sorry, forget about src. It's just crap, in a hurry I mixed things... :o

So let's start form the beginning! With which compiler do you have build your application?

afflictedd2
5th February 2011, 00:14
I am building with QtCreator, and there are two compilers:

Qt 4.7.0 and Qt in Path. Both are compiling and the application runs fine from QtCreator

I have included this in the beginning of my user path:

C:\Qt\2010.05\mingw\bin;C:\Qt\2010.05\qt\bin;C:\lc c\bin;C:\cygwin\bin;... etc.

Not sure if the other stuff affects it, but I think it stays with the first executables it sees. I am still unable to double click and run my application without the same error.

gcubar
5th February 2011, 01:53
Check if there are any other library QtCore.dll in c: / windows/system32 or c: / windows.

and ... just to test, copy QtCore.dll, QtGui.dll and others that your application uses to the folder where the executable of your application and run it again.

aamer4yu
5th February 2011, 07:14
Try to place the C:\Qt\2010.05\qt\bin path before other paths in the PATH env variable and see if it works.
Probably it is getting C:\Qt\2010.05\mingw\bin first and picking libraries from there.

Iderval
5th May 2011, 22:06
Guys you are awesome!
I had the same proble in deploying in release mode. I had even tried to put C:\Qt\2010.05\qt\bin in the PATH and nothing happend until I tried the suggestion of aamer4yu to put the path before any other.
I don't know why but it worked!
Thanks !!!