Ok I will try to bring all the intel together
I have installed QT 5.1.0 in c:\5.1.0
Here is a screnie of the Visual Studio components:
msvs.jpg
The Screenie of the QT5 dir:
qt5dir.PNG
The QT5Widgets.dll's:
qt5widgets.jpg
Thx for your help!
Ok I will try to bring all the intel together
I have installed QT 5.1.0 in c:\5.1.0
Here is a screnie of the Visual Studio components:
msvs.jpg
The Screenie of the QT5 dir:
qt5dir.PNG
The QT5Widgets.dll's:
qt5widgets.jpg
Thx for your help!
Anyone else some ideas please?
pretty please?!
Dependency Walker now shows these three Files missing:
API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
EXT-MS-WIN-NTUSER-UICONTEXT-EXT-L1-1-0.DLL
IESHIMS.DLL
Shall I put them in the deployment dir or not?
I still have no idea what to do with these red marked lines:
depends23.jpg
I will try to put together a blow-by-blow in the morning when I get a suitable Windows machine built up.
xtlc (20th November 2013)
OK. I will go through an entire build step by step. I have use the command prompt so I can be precise about what is copied, from where, and it is copy-n-paste ready.
I have the following:
- A fresh Windows 7 machine
- A fresh Windows SDK 7.1 install. This has the same compilers as VS2010, so you will have to substitute 2012 everywhere you see 2010.
- A fresh install of Qt 5.1.1 using the online installer. This is a 32-bit ANGLE build in the default, C:\Qt, folder.
I created a test folder and placed two test files in it.
test.pro:
main.cpp:Qt Code:
TEMPLATE = app TARGET = test INCLUDEPATH += . QT += widgets # Input SOURCES += main.cppTo copy to clipboard, switch view to plain text mode
From the Start menu, All Programs, Qt, 5.1.1, "MSVC 2010" launch "Qt 5.1.1 for Desktop (MSVC 2010)"Qt Code:
#include <QApplication> #include <QWidget> int main(int argc, char **argv) { QWidget w; w.show(); return app.exec(); }To copy to clipboard, switch view to plain text mode
From the command prompt run:(This path may differ depending on how you got your C++ compiler. The batch file may be called vcvarsall and may live under a Visual Studio folder.)Qt Code:
"C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\SetEnv.cmd" /x86 /releaseTo copy to clipboard, switch view to plain text mode
Then build and test the program which should launch a single empty window:
Check that the release\test.exe program does not run if double-clicked from Windows Explorer.Qt Code:
qmake CONFIG+=release nmake release\test.exeTo copy to clipboard, switch view to plain text mode
Now, back in the command prompt:
Check that the "deploy\test.exe" program does run if double-clicked from Windows Explorer on the developer machine.Qt Code:
mkdir deploy xcopy release\test.exe deploy xcopy c:\Qt\5.1.1\msvc2010\bin\Qt5Core.dll deploy xcopy c:\Qt\5.1.1\msvc2010\bin\Qt5Gui.dll deploy xcopy c:\Qt\5.1.1\msvc2010\bin\Qt5Widgets.dll deploy xcopy c:\Qt\5.1.1\msvc2010\bin\libEGL.dll deploy xcopy c:\Qt\5.1.1\msvc2010\bin\libGLESv2.dll deploy xcopy c:\Qt\5.1.1\msvc2010\bin\D3DCompiler_43.dll deploy xcopy c:\Qt\5.1.1\msvc2010\bin\icudt51.dll deploy xcopy c:\Qt\5.1.1\msvc2010\bin\icuin51.dll deploy xcopy c:\Qt\5.1.1\msvc2010\bin\icuuc51.dll deploy mkdir deploy\platforms xcopy c:\Qt\5.1.1\msvc2010\platforms\qwindows.dll deploy\platformsTo copy to clipboard, switch view to plain text mode
Back in the command prompt:
This path may be different on your machine: just find the VC redistributable that matches your compiler in the Windows SDK or Visual Studio folders.Qt Code:
xcopy c:"\Program Files\Microsoft SDKs\Windows\v7.1\Redist\VC\vcredist_x86.exe" deployTo copy to clipboard, switch view to plain text mode
Copy the "deploy" folder including subdirectory to another non-dev machine.
Run the "deploy\vcredist_x86.exe" on the target machine to install the VC runtime. (This exe is not required again after this)
Check that the "deploy\test.exe" program does run if double-clicked from Windows Explorer on the non-dev machine.
Last edited by ChrisW67; 20th November 2013 at 22:41. Reason: Pressed submit prematurely
Thank you very much. I will try this tomorrow first thing in the morning, when the coffeine still does its job.
My PC is a win8, I already have some troubles in an early stage
Here is my *.pro file:
Looks similar to yours ...Qt Code:
#------------------------------------------------- # # Project created by QtCreator 2013-07-25T11:53:23 # #------------------------------------------------- QT += core gui\ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = GUI TEMPLATE = app include(qextserialport-1.2rc\src\qextserialport.pri) SOURCES += main.cpp\ mainwindow.cpp \ protokoll.cpp \ multireturn.cpp \ qcustomplot.cpp HEADERS += mainwindow.h \ protokoll.h \ multireturn.h \ qcustomplot.h FORMS += mainwindow.ui DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0To copy to clipboard, switch view to plain text mode
But I dont have your path - instead I could offer:
but in this directory, there is only a "NETFX 4.0 Tools" folder and no "SetEnv.cmd" in it - or on any other part on the HDD What shall I do now? I found a "SetEnv.c" tough.Qt Code:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\"To copy to clipboard, switch view to plain text mode
Microsoft, in their wisdom, removed the native compiler (cl.exe, link.exe and friends) from the Windows 8 SDK. They are part of Microsoft Visual Studio though.
Building on the Command Line
Setting the Path and Environment Variables for Command-Line Builds
The environment setting scripts is "vcvars32.bat" according to the docs above.
If it is all too difficult to build from the command line you can use Qt Creator or VS to build my test project in release mode and continue from the command prompt.
I did the "Setting the Path and Environment Variables for CMD Line Builds" - altough I tried the 64Bit version: http://msdn.microsoft.com/en-us/libr...(v=vs.110).apx - so I executed VCVARSALL with no argument (so my output should become a 32Bit exe, right?)
Added after 17 minutes:
If I now do the cmd thingy thing:
"aktuell" means "up to date".Qt Code:
c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>nmake "c:\Users\verena\De sktop\build-GUI-Desktop_Qt_5_1_0_MSVC2012_64bit-Release\Makefile" Microsoft (R) Program Maintenance Utility, Version 11.00.50727.1 Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten. ""c:\Users\verena\Desktop\build-GUI-Desktop_Qt_5_1_0_MSVC2012_ 64bit-Release\Makefile"" ist aktuellTo copy to clipboard, switch view to plain text mode
So if I then do the xcopy thing in my deployment folder and double click it -> nothing happens. I dont understand why this is such a big thing to do. I want to spend my time coding, not wondering what I do to bring my program to run. Thats something I would feel a SDK should take care of. I am obviously missing sth here... what is it?
Last edited by xtlc; 26th November 2013 at 00:50.
Running:
without arguments will set up to run a 32-bit compiler. It does not compile anything.Qt Code:
"c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall"To copy to clipboard, switch view to plain text mode
The shadow build directory name "c:\Users\verena\Desktop\build-GUI-Desktop_Qt_5_1_0_MSVC2012_64bit-Release\Makefile" would indicate you have built using a 64-bit compiler and Qt library. Running nmake in an already built project directory will announce that that program is up-to-date: that is what a Make Utility does based on file timestamps.
The two must match. A 32-bit VS2012 C++ compiler with 32-bit VS2012 Qt libraries, or 64-bit VS2012 compiler with 64-bit VS2012 Qt libraries. Mix-n-match is not going to cut it.
Start with an EMPTY directory. Put my source files in it. Run through my process. Do you get a working result?
Exactly what have you got?
I installed this: http://msdn.microsoft.com/en-us/wind.../hh852363.aspx
I made a new dir on desktop, copied your source in the two files.
I used "Qt 5.1.0 64-bit for Desktop (MSVC 2012)" and did try to give x86_amd64 as an argument. It didnt want the "/release" argument. When I did qmake then
-> worked. nmake
-> not set up for 32Bit system
So... how can I use this in 64Bit?
Originally Posted by The Page You LinkedDo you have Visual Studio 2012 installed?Originally Posted by Me
Do you have Qt 5.1.1 for MS VS2012 64-bit installed?
It does not matter how you build my sample sources, just that we have a known simple example program from which to build a deployment kit. The point is to compile a 64-bit release version of my test program and get the resulting test.exe file. Clearly using a command line is proving too difficult for you.
Use Qt Creator if that is what you have been using. Use Visual Studio if that is what you are comfortable with.
The remainder of my instructions are about copying the compiled program (test.exe) to a folder along with the necessary support files. You can do this copying from a command prompt or by doing the same steps manually. You need to adjust the paths to suit your specific versions of Qt and Visual Studio.
I know the steps as presented work.
Bookmarks