PDA

View Full Version : Even built in release mode , binay is asking for Qt debug dlls and QtTest4.dll



avanindra
15th September 2012, 13:51
Hi Folks,


I have a c++ project , for which I have written GUI in Qt. My platform is Windows 7 , vs2010 win64. After compiling the project in release mode , when I try to execute it on different windows 7 pc , the executables asks for Qt debug run time dlls ( QtCored4.dll , QtGuid4.dll ) and even QtTest4.dll , which I am not able to make head or toe , why is it asking. Other dependent librararies are OpenCV and VTK , in which the compiled VTK needs Qt too but I had it compiled carefully in release mode.

Can anyone please explain , what is wrong going on here.

I would really appreciate any help.

Many thanks and regards

Avanindra Singh

amleto
15th September 2012, 21:57
You linked your program wrong when you built it.


This is not exactly a 'programming' question, is it? There are other more suitable sub forums than this.

ChrisW67
16th September 2012, 03:30
Even built in release mode , binay is asking for Qt debug dlls and QtTest4.dll
No. It is either built in in release mode and asking for release libraries, or it is built in debug mode and asking for debug libraries. When you switch from one to the other you must completely rebuild the project, i.e. make clean, qmake, make, or you will be linking together already built, unchanged object files that still reference the debug libs.

If a released program is dependent on QTest at all then you are doing it wrong.

amleto
16th September 2012, 11:19
No. It is either built in in release mode and asking for release libraries, or it is built in debug mode and asking for debug libraries. When you switch from one to the other you must completely rebuild the project, i.e. make clean, qmake, make, or you will be linking together already built, unchanged object files that still reference the debug libs.

If a released program is dependent on QTest at all then you are doing it wrong.

Not quite. If he's building in studio, then it is possible to build 'release' config and specify debug libraries to link.

ChrisW67
16th September 2012, 23:41
qmake is certainly not going to do that though. If avanindra has chosen to do something oddball outside of the Qt build mechanism then the solution is obvious.

avanindra
17th September 2012, 14:46
Thank you all for your replies. Yes it was the problem with linking but a bit subtle one.

I compiled OpenCV library with qt dependence ( which was a third party library for my project. ). Even though it was compiled in release mode , it contained debug symbols. I did no go in depth to investigate the problem because of time constraint. But I solved the problem by recompiling from scratch the library with all the debug symbol flags disabled.

Also my project was CMake based , not that it had anything to do with my problem.

Thank you very much for all your replies.

Regards

Avanindra Singh