Says I am missing a .dll file that is there
I just installed QT4 and i read this tutorial for a hello world program. When i compile it it say I do not have the QTCore4.dll file so the .exe file cannot run. I then looked in the QT folder and i found QTCore4.dll in the bin folder. Here is my code if it matters.
Code:
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QPushButton test
("I am testing my first GUI application");
test.show();
return app.exec();
}
I am also using the Code::Blocks IDE with the MinGW compiler. Thanks.
Re: Says I am missing a .dll file that is there
Is the directory containing the DLL in your PATH ?
Re: Says I am missing a .dll file that is there
I don't know, how do i check?
Re: Says I am missing a .dll file that is there
Start->Run, type "cmd", hit enter. When block box appears, type "echo %PATH%" and press enter.
Re: Says I am missing a .dll file that is there
ok it says, "C:\Windows\system32;C:\Windows\System32\Wbem;C:\W indows\System32\WindowsPowerShell\v.1.0\;C:\Progra m Files\Quicktime\QTSystem
Re: Says I am missing a .dll file that is there
Quote:
Originally Posted by
bijan311
ok it says, "C:\Windows\system32;C:\Windows\System32\Wbem;C:\W indows\System32\WindowsPowerShell\v.1.0\;C:\Progra m Files\Quicktime\QTSystem
try running your app from the Qt Command Prompt which sets up the required environment variables and path for you.
Re: Says I am missing a .dll file that is there
Ok when I did that it said "The procedure entry point _ZN7QString16fromAscii_helperEPKci could not be located in the dynamic link library QtCore4.dll"
Re: Says I am missing a .dll file that is there
Please start a Qt command prompt and show us what is printed to the console.
Re: Says I am missing a .dll file that is there
Re: Says I am missing a .dll file that is there
now I'd like to see the entire path from this command prompt - just type 'path'. Also cd into the folder where your app is and run it. If you can show all this in a screenshot like you did.
Re: Says I am missing a .dll file that is there
Re: Says I am missing a .dll file that is there
Quote:
Originally Posted by
bijan311
looking at your code... where did you get this example?
It seems like a console app but you are trying to use widgets. Can you show how you build this exe and all the files that are part of it?
Re: Says I am missing a .dll file that is there
Your program is using the wrong DLL - it's using the one in c:\qt\4.6.2\bin rather than the one in c:\qt\4.6.2\qt\bin
The problem is that QtCreator requires the DLL in bin whilst your program requires the DLL in qt\bin.
One way of solving the problem would be to copy the QtCore4 and QtGUI4 DLLs from c:\qt\4.6.2\qt\bin to the directory where your executable is (The 'release' dir)