Deploying Qt apps compiled with Visual C++ Express Edition
Hello everyone,
have have just found out that the Qt4 libs compiled with/for Visual C++ are way smaller than those for mingw.
So I thought, it would be a good idea, to use Visual C++ with Qt on Windows (only for deploying the app, Qt Creator is just too good and I'm on Linux most of the time anyway).
So my question is whether you do have to ship a certain runtime for apps compiled with Visual C++ or not?
With mingw, you only need to ship the mingw and gcc dlls but apparently there is a thing called "Visual C++ Redistributable". Is it necessary that this is installed for the application to work?
Thanks in advance
Re: Deploying Qt apps compiled with Visual C++ Express Edition
Well, yes. You have to ship the Visual C++ run time library, which is included in the Visual C++ redistributable.
On GCC, you have to ship the GCC runtime library, unless you statically link it.
The advantage of Visual C++ is that its more common and thus more likely to already be installed on the PC. It's even shipped with the OS, but of course you can't confirm that its the correct version until its too late, so you normally distribute your program and Visual C runtime seperately unless it commercial, in which case, you bundle both together on the CD.
Do note however, that there are incompatibilities between GCC and VC++. For example, compiler extensions (such as structure alignment and padding), different library files, etc, so it might not be as easy as doing your entire project under QtCreator and just recompiling under VC++ before deployment.
Re: Deploying Qt apps compiled with Visual C++ Express Edition
Mh, I think I'll stick with gcc in that case. As my programm is a downloadable application, it would be rather complicated to offer the Redistributable also or explain to the users why they have to install another programm.
Re: Deploying Qt apps compiled with Visual C++ Express Edition
Quote:
Originally Posted by
fatjuicymole
Well, yes. You have to ship the Visual C++ run time library, which is included in the Visual C++ redistributable.
On GCC, you have to ship the GCC runtime library, unless you statically link it.
The advantage of Visual C++ is that its more common and thus more likely to already be installed on the PC. It's even shipped with the OS, but of course you can't confirm that its the correct version until its too late, so you normally distribute your program and Visual C runtime seperately unless it commercial, in which case, you bundle both together on the CD.
Do note however, that there are incompatibilities between GCC and VC++. For example, compiler extensions (such as structure alignment and padding), different library files, etc, so it might not be as easy as doing your entire project under QtCreator and just recompiling under VC++ before deployment.
Hi,
Which is the Visual C++ run time library that I have to ship with the application?
Best
Re: Deploying Qt apps compiled with Visual C++ Express Edition
Quote:
Originally Posted by
wmnnd
Mh, I think I'll stick with gcc in that case. As my programm is a downloadable application, it would be rather complicated to offer the Redistributable also or explain to the users why they have to install another programm.
Or you could use a installer program which automatically installs the appropriate files.
Quote:
Originally Posted by
franco.amato
Hi,
Which is the Visual C++ run time library that I have to ship with the application?
That depends on the version of VC++ used to compile your application and what libraries it depends on. For this reason, you should use the Redistributable Package for the version of the compiler you used. This ensures everything works and that you fully comply with any licensing.
Re: Deploying Qt apps compiled with Visual C++ Express Edition
But why would I want to use MSVC++ if it's so much more complicated to deploy my apps then?
Does it have any benefits (except for binaries which are a little smaller)?
Re: Deploying Qt apps compiled with Visual C++ Express Edition
Quote:
Originally Posted by
wmnnd
But why would I want to use MSVC++ if it's so much more complicated to deploy my apps then?
Does it have any benefits (except for binaries which are a little smaller)?
It's not more complicated if you write the entire app using it. It CAN get more complicated if you write your app in QtCreator and then port it across to MSVC++ for the final deployment, which is what you said in your first post.
If you don't want the hassles of using two different compilers, then stick with the one you prefer. I know I wouldn't want to do the entire app using QtCreator, then all the testing, and then port and re-test under MSVC++. I'd use one and stick with it.
Re: Deploying Qt apps compiled with Visual C++ Express Edition
Quote:
Originally Posted by
fatjuicymole
Or you could use a installer program which automatically installs the appropriate files.
That depends on the version of VC++ used to compile your application and what libraries it depends on. For this reason, you should use the Redistributable Package for the version of the compiler you used. This ensures everything works and that you fully comply with any licensing.
Hi,
how can I use that package? I never used it.
Thanx in advance.
Best Regards
Re: Deploying Qt apps compiled with Visual C++ Express Edition
Re: Deploying Qt apps compiled with Visual C++ Express Edition
Quote:
Originally Posted by
wmnnd
But why would I want to use MSVC++ if it's so much more complicated to deploy my apps then?
Does it have any benefits (except for binaries which are a little smaller)?
I think it is not more compilcated - you just have to ship different dlls than with MinGW. (something like mscrt90.dll or something)
Re: Deploying Qt apps compiled with Visual C++ Express Edition
Quote:
But why would I want to use MSVC++ if it's so much more complicated to deploy my apps then?
Does it have any benefits (except for binaries which are a little smaller)?
Check this post and this link.
It seems that not only the size but better performance. Personally I use QtCreator, I prefer it better, and not being a professional, I prefer KISS (keep it simple stupid) and save myself the pain of installing MSCV and putting it to work. Besides I dont like the ideia of having to install the MS Redistributable Package
Quote:
Hi,
how can I use that package? I never used it.
Just download it from Microsoft site and install it.
Re: Deploying Qt apps compiled with Visual C++ Express Edition
I'm using QtCreator under Windows7 but without MinGW, so it uses Visual Studio toolchain, which I have installed on my system.
If you have Visual Studio installed then there is in path like this:
Quote:
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\x86
are dirs with required dlls. CRT are base dlls (C RunTime).
Also you can have look here which is a sub page of this page.
Also you can use Dependency Walker to determine which of those dlls are used by your app.
Re: Deploying Qt apps compiled with Visual C++ Express Edition
Quote:
Originally Posted by
fatjuicymole
What package ?
The Redistributable package
Re: Deploying Qt apps compiled with Visual C++ Express Edition
It's just download and run, literally. For Visual Studio 2008, you would download http://www.microsoft.com/downloads/d...d-074b9f2bc1bf whereas for VS2005, you would download http://www.microsoft.com/downloads/d...9-220b62a191ee, or just include the appropriate file with your download or cd and it'll install whatever is necessary.
Re: Deploying Qt apps compiled with Visual C++ Express Edition
I noticed use of Visual Studio and Qt Creator are seen as either/or. It's not that way. Though Nokia/Qt recommends the Visual Studio add-ins approach, one can also just use the MSVC compiler and develop with Qt Creator. I do that. All works, debugging etc. Nice! :)