PDA

View Full Version : Deploying to Windows



digitalfriction
20th September 2012, 13:13
Hi,

completely new to QT, but trying to pick it up. I have built a very very basic application which runs fine in the QT Creator, however if I try to run the exe from the debug or relase folder, I am getting messages about missing dll's. If I copy the dlls from other locations (by searching the QT SDK install folder) I eventually get an error:

" The procedure entry point ?metric@QWidget@@MBEHW4PaintDeviceMetric@QPaintDev ice@@@Z could not be located in the dynamic link library QtGuid4.dll "

I have found this guide which says I need to configure static links:

http://qt-project.org/doc/qt-4.7/deployment-windows.html

However I cannot even run the 'configure' command, I get an error:

"'configure' is not recognized as an internal or external command, operable program or batch file.

I must be in the wrong directory, but when I search for configure.exe it is only in the symbian folder, and I am not developing for symbian?

I forgot to add that I want the exe to be executable on a pc that DOES NOT have QT SDK installed. For example, I have QTSDK on my main pc, but I want my application to run on 2 laptops and maybe I could compile it for a linux pc, but none of these will know anything about QT.

I have also tried to follow this post:

http://doc.qt.digia.com/latest/deployment-windows.html

But I do not have nmake??????

Ive got to say, so far I have found the setup and running of QT very complicated, there seems to be a lot of forums and tutorials, but nothing that really shows a beginner, what to install, how to start making a program and how to deploy that program to Windows, Linux, Symbian etc, which is basically what the tool is supposed to do isnt it??? I am moving from C# on visual studio, and at first need to be able to replicate what I can do in Visual Studio, so far....nada !

Ashkan_s
20th September 2012, 16:37
I'm not sure whether I understand right, but seems you have Qt SDK installed already and the first parts of the guides explains how to compile and install Qt SDK from source code.

If so, to create an standalone application you need to compile your program in release mode. There's a PC icon in the left side of Qt Creator you can change the mode using it if it is in debug mode.

digitalfriction
20th September 2012, 17:15
Hi,

I do have Qt SDK installed, but I did not compile it myself, I downloaded the open source binary for windows.

I have the problem whwether I use a debug or a release build. I have however now realised that the exe will work if I copy it into the C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\bin folder, so this means that I can get away with finding the necessary dll's each time I deploy, and include them with the exe, or use an installer to put them in the System32 directory.

I hope it isnt this difficult to deploy to systems I am less familiar with (linux) as the whole point of me trying to move to Qt is to deploy to multiple environments.

ChrisW67
21st September 2012, 01:53
completely new to QT, but trying to pick it up. I have built a very very basic application which runs fine in the QT Creator, however if I try to run the exe from the debug or relase folder, I am getting messages about missing dll's. If I copy the dlls from other locations (by searching the QT SDK install folder) I eventually get an error:

" The procedure entry point ?metric@QWidget@@MBEHW4PaintDeviceMetric@QPaintDev ice@@@Z could not be located in the dynamic link library QtGuid4.dll "


Then you likely have the wrong DLLs. The DLLs in QtSDK\QtCreator\bin are the ones that Qt Creator uses. They are built with the same Microsoft compiler as Creator and cannot be used by an application built with a different compiler e.g. MingW or possibly newer MSVC. The DLLs and plugins you want are in the QtSDK\Desktop\Qt\4.8.x\{compiler}\bin and \plugins directories you configured and built your project with.

digitalfriction
21st September 2012, 10:01
Thankyou ChrisW67, that explanation has made a lot more sense.