Problems running projects
-
windows searches for dll in the following way:
Current directory of your executable
windows system directory
all paths loacted in the %PATH% environment variable
Side by Side is searched in :
C:<Windows>\system32\WinSxsYou can look into this "MSDN article":http://msdn.microsoft.com/en-us/library/ms684175(VS.85).aspx for more information on that.
bq. The first directory searched is the directory containing the image file used to create the calling process (for more information, see the CreateProcess function). Doing this allows private dynamic-link library (DLL) files associated with a process to be found without adding the process's installed directory to the PATH environment variable. If a relative path is specified, the entire relative path is appended to every token in the DLL search path list. To load a module from a relative path without searching any other path, use GetFullPathName to get a nonrelative path and call LoadLibrary with the nonrelative path. For more information on the DLL search order, see Dynamic-Link Library Search Order.
-
Sigh...
I am afraid it didn't work. I am desperate right now so much, I really need to get some work done during the weekend.
Any other possible solutions? I don't know maybe I did that process in the wrong way? I have created a new variable called qtcreator and inserted C:\Qt\2010.05\mingw\bin;C:\Qt\2010.05\qt\bin.
Do you think I did something wrong?
I am sorry this thread is taking ages to solve.
-
What? Who said anything about making a new environment variable called qtcreator? Just add C:\Qt\2010.05\mingw\bin;C:\Qt\2010.05\qt\bin\ to the existing PATH environment variable.
-
Okay, this time it was done right.
Still doesn't work though, still displaying same message in Qt, but in windows the .exe file displays a new error now.
"The program can’t start because MSVCP71D.dll is missing from your computer. Try reinstalling the program to fix this problem.”
What does it mean anyway? At least has the other one been solved?
-
This is the same type of error. The system cannot find another dll. In this case MSVCP71D.dll. This looks to be a debug dll from the MS Visual C toolchain.
Can you clarify which compiler you are using to build your app please? You should be using mingw or MSVC not both. What is your Qt built against? From your previous posts it looks like you are using Mingw. I am not sure why you have this dependency on the MSVC debug runtime.
-
Please use dependency walker. With this you will see which lib is missing.
"Dependency Walker":http://www.dependencywalker.com/ -
Thanks for still providing help.
I think I am using mingw but how can I know for sure?
Do you think Microsoft Visual Studio 2010 has something to do with this? At work I have NetBeans, Qt, Microsoft Visual Studio, and Eclipse on same computer and works great all together.
I don't understand what could be the problem on this computer.
-
Load the binary in the dependency walker and show the picture. Then we can see what's wrong. I'm having all versions running on my pc. It's just a matter of environment configuration!
-
Sorry, by binary you mean the qtcreator.exe?
If so, it displays the IEFRAME.dll as red with a small hourglass on the side.
Is this any helpful?
Thank you.
-
You want to start a application, isn't it? This application you have to load in the dependency walker.
-
Okay, I have loaded the .exe file of my application and this is the output...
MSVCP71D.DLL (yellow question mark)
MSVCR71D.DLL (yellow question mark)
QTCORED4.DLL (red)
IEFRAME.DLL (red + hourglass)By the way, the application doesn't run at all. Both on Qt or from Windows.
-
From Qt? You mean creator!
As you said you build for windows, which lib wants to include MSVC[P|R]71D.dll ?
QtCored4.dll is the debug version of Qt. Did you put the libs beside the exe?Where is the screen shot of dependency viewer?
-
Is this on the development machine or on some other random machine to which you are trying to deploy your application?
-
I am implementing and testing my application on the development machine.
This is the print screen from dependency walker with <filename>.exe loaded.
!http://img854.imageshack.us/i/dependencywalker.jpg/(DependencyWalkerPrint)!
And yes, I mean Qt Creator, the damn app won't run in any way.
I have tested the application on another machine with Qt Creator and it works perfectly.
Thanks.
-
Link or image is missing.
-
Oh I tested and it works. Open image in new tab.
Well here is the actual link
-
OK. Well that shows that QtCore4d.dll cannot be found in the dll search paths. LOcate this dll on your machine and make sure that it is in one of the dirs listed in the %PATH% environment variable.
Can you paste the value of the %PATH% env var please. Also where are your QT libs installed?
-
Also, make sure you use the right QtCore4.dll file. The default SDK distribution comes with two versions: one version that is used by the Qt tools itself (build with MSVC, I think), and one that is used for the applications build with these tools, build with MingW32 by default, but overwritten if you build Qt with VS yourself. You are probably going to need the second one. That version is located in QtRoot\qt\bin, where QtRoot is the root directory of your Qt installation, for example c:\Qt\2010.05\
The version in QtRoot\bin is the version used for Qt's tools itself, and that one probably will not work.
-
This is the Path environment variable...
C:\Program Files\PC Connectivity Solution;C:\Program Files\ATI Stream\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Qt\2010.05\mingw\bin;C:\Qt\2010.05\qt\bin;*C:\Windows\System32*
In bold is the new addition of the QtCored4.dll in the Path environment variable.
Libraries are found inside the Qt installation folder itself since I have installed the Qt SDK and not the Frameworks individually. Do you think I should install the 4.7.2 version of Qt libraries (minGW 4.4, 321 MB) instead of the already installed 4.7.0 included with the SDK?
Qt libs are installed in C:\Qt\2010.05\lib
-
you must use the version you linked again or newer.
If 4.7.0 is installed on the machine and found by the path before 4.7.2 and you link against 4.7.2, it will not work!the other way round it would work