PDA

View Full Version : qt project release problem



robotics
6th March 2012, 06:44
Hi guys
I am using windows 7. And I have a problem with release of qt project.
The error says cannot find -lQtGui4. The project runs well in debug mode, the only problem that i have is in the release mode. please help

ChrisW67
6th March 2012, 06:58
Where is that error message coming from? Building the release version or at some point while trying to start a deployed release version?

robotics
6th March 2012, 07:04
Building the release version..... I am not able to create .exe file from my project

ChrisW67
6th March 2012, 07:29
That file is part of Qt and should be present along with QtCore4 and friends, and their debug versions QtGui4d etc. that you were previously using.

Have you cleaned the project, rerun qmake and tried again?

robotics
6th March 2012, 14:15
can u please elaborate the process of qmake please....
I tried it several times but came out with no luck every time.
please help

robotics
6th March 2012, 17:27
finally I ran out of idea and reinstalled my qt.
and I got a new problem again when i try to run my project in release mode.
error message is as follows
exited with code -1073741511
please help

Added after 1 2 minutes:

solved problem:
copied all the dll files from C:\Qt\2010.05\qt\bin to system 32 folder and all my problem flushed....;)
also I you want a help from me do contact me
surajready2go@gmail.com

d_stranz
6th March 2012, 21:30
solved problem:
copied all the dll files from C:\Qt\2010.05\qt\bin to system 32 folder and all my problem flushed....;)


That is absolutely the WRONG way to solve the problem. Reinstalling Qt, and copying files to the system32 folder is simply wrong. Instead of figuring out what was really wrong with your build process, you pulled out the biggest hammer you could find and beat it to death.

The original problem with the build is that you probably did not have your Qt .pro file configured correctly, or perhaps you really didn't install Qt correctly the first time.
The next problem (being able to run the exe once you built it) is because the Qt bin directory isn't in your $PATH environment variable.

So even though it works now, the next time you update to a later version of Qt and suddenly none of your new projects will run correctly, remember how you messed up your system32 folder and think about the right way to develop and deploy Qt projects.

robotics
7th March 2012, 07:25
so what is the correct method when the problem says that some dll files are missing??

Spitfire
8th March 2012, 13:48
the Qt bin directory isn't in your $PATH environment variable.

That tells you all.
Add your Qt bin directory to your environment PATH variable and you're good to go (on this box).
If you want to deploy that app on other computer you will have to include all required libraries with your binary.
Use Dependency Walker (http://www.dependencywalker.com/)if you don't know what libraries you need.

And delete the files you've copied to the system32 folder!!!

robotics
9th March 2012, 16:31
can you explain me the reason that I should delete those files from system 32

Spitfire
9th March 2012, 16:39
Because they should not be there in the first place.
If they're in the system32 every app will pick up them first before looking at what's in other places.

If you've copied qt 4.6.3 in there and then try to run app that depends on qt 4.8, for example, it may crash, it may missbehave, etc.
basically - you should not copy anything to that folder without very good reason.
and not deploying app properly or not using PATH variable is not a good reason.

Edit:
In case someone gets it VERY wrong - I ment to delete the Qt binary files copied to the system32 directory, not the entire content of the system32 directory!