Deploy a C program compiled in VS2010 - c++

I have a compiled an older C++ program that runs fine in debug mode in VS2010 converted to VC++ 6 but I have no idea how to package or deploy the application.
VS2010 may not have anything to do with deploying the program at all but I thought I should mention it.
The "release" folder not only contains the executable but some "obj", "tlog", "vc100.pdb", "exe.intermediate.manifest" and "lastbuildstate".
This application is being installed on Windows Mobile OS (hopefully). It isn't as simple as copying the executable to the device is it?
Do I need to create a cab file or msi and, if so, how?
I am absolutely new at this being spoiled in C# and MVC for far too long!

Visual Studio 2010 does not have any of the Smart Device compilers (managed or native) required to even build for Windows Mobile (not Windows Phone). You must use Visual Studio 2008 to build, deploy and/or debug.
EDIT
FWIW, Studio 2012 will have support for Smart Devices (Studio 2010 still won't get support) in Q1 of next year. Backward-compatibility has yet to be announced, but it's always possible that you'll be able to develop for WinMo devices using the ARM compiler. There's a video here detailng some of the features.

Have you done a search on google yet? While I don't know anything about deploying to a windows phone, a quick google search found a few hits.
I searched for 'deploy windows phone app' and found a few things. Among which are:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/gg588378(v=vs.92).aspx
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff928362(v=vs.92).aspx
Last of all, it looks like this has been asked before on this website. For instance:
Can you install you own apps on your windows 7 phone

Related

visual studio 2015. c++ console application converted in setup project with all dll

So i'm fairly new to VS and coding and I've recently made a small snake game in a C++ console application project, which works fine but i would like to get it to work on another PC without VS. The closest i have found to answering my question were these other StackOverflow questions here and here. i have installed the vs installer projects extension to try make it a setup project and include the required dependencies but i cant work out how to do this. Does anyone have any info to guide me through my last step of this problem or am i completely on the wrong track?
If the application uses dynamic runtime (which is the default), it uses the VS DLL files. To provide them, the Visual Studio Runtime Redistributable for that particular VS version needs to be installed on the target machine (as mentioned in your second link).
So that means you need to setup the installer that way. I didn't use it, but there might be some options that the resulting setup can either contain or download and install the VS redistributable automatically.
See also here: How to install redistributable with visual studio setup? (but it is for VS 2013, there might be some changes in 2015)
Well, you don't tell us what kind of project your C++ console app is...
Using only C++, your app can be built with different versions of the CRT, like for instance:
V120 (VS-2013)
V120_XP (VS-2013 w/ XP support)
V140 (VS-2015)
V140_XP (VS-2015 w/ XP support)
Even on VS 2015, you can choose the version of the CRT you want, and use an older version, if needed.
Anyway, the target computer will need the DLLs for the correct CRT version.
Microsoft provides them. You can either ship them with your product, if you have a custom installer, or use the installer provided by Microsoft.
MSDN - Determining Which DLLs to Redistribute
For instance, using V120:
msvcp120.dll
msvcr120.dll
Your project might also use .NET.
In such a case, you also need to install the correct version in the host machine.

remove msvc dlls dependency to run qt application

How to remove msvc dlls (example: msvcr100.dll) dependency to run qt appliation?
I've developed a qt application which runs just fine in dveloper machine but unable to run on any other machine gives error message "program can't start because MSVCR100.dll is missing from your computer". I can solve this error by copying that file in the application folder but I dont want to copy, instead I want to link statically or some other way to remove that dependency.
Thanks in advance
The issue is that you are probably trying to run an application on a machine which has a different Visual Studio (MSVC) version installed than the version that was used for building your application itself.
Generally, the correct solution is to install the corresponding Visual Studio redistributable package on the target machine. It is not a "workaround" or "hack" because if you wish to use an application built with different runtime libraries, etc, then it is expected. Here you can read a bit more about it:
Redistributing Visual C++ Files
Yes, it is a bit unfortunate, and apparently MS has not managed to make it the most ideal, but after all, it is simple enough to circumvent. Note that the target machine would not only have issues with your application, but in general with any distributed in a similar fashion.
The other way to solve the issue is to build the application with the same environment that is installed on the target machine, but this can easily go haywire if you need to supply the application to several machines with versatile setup. Now, I would say this is the "hackish" approach.
You will need to grab the redistributable for this particular problem from here:
Microsoft Visual C++ 2010 Redistributable Package (x86)
Microsoft Visual C++ 2010 Redistributable Package (x64)
Even if you went down for statically hacking this around somehow, you would need to deal with nasty consequences when using your application with DLLs and static libraries, etc.
As far as I know, you can't link statically to Visual Studio Redistributable. Any application built with Visual Studio Compiler needs the corresponding msvcXXX.dll to run. Installers containing all dll for each specific version of MSVC are available here: http://search.microsoft.com/en-us/DownloadResults.aspx?q=redistributable
If you want avoid errors for your users when you distribute your application, you have some solution. A commonly used is to install the right redistributable package before installing your application on the user machine. Often used tools (NSIS, Inno Setup, etc.) have options to run other executable in the process. And each Microsoft redist package can be run silently (without any window display to user).
Note: This problem is absolutely not related to qt. It comes directly from the compiler you choose.

Can I deploy for Windows 2000 using Qt 4.8.4?

I have created an application using Qt 4.8.4, and now I have to distribute it on Windows 2000 machines, among the others. I have already tried searching over the Internet for a clear explanation about it, but I can't find a confirmation on what's the older Windows version actually supported by Qt.
The application runs fine on Windows XP (both 32 and 64 bit) and Windows 7 but, when I try to launch it on Windows 2000 I receive the well-known error "[Application name].exe is not a valid win32 application.", and I guess that the error relies on the unsupported Windows version.
The application is a "simple" one, it just need QtCore4.dll and QtGui4.dll as dependencies.
If it can help, I am developing on a Windows 7 64 bit machine, using Qt 4.8.4 and Qt Creator 2.7.1. If I go under Tools->Options->Build&Run->Kits->Manual->Desktop, I have "Microsoft Visual C++ Compiler 10.0 (x86)" as the compiler in use. Do I have to select a different one, maybe?
Thanks for any answer.
EDIT: What I've done after reading #vahancho's answer:
"Move" the project from Qt Creator to Visual Studio 2010, using CMake;
Install Visual Studio Express 2008 (enabling the V90 Platform Toolset, this way)
Open the project from VS2010, and go under Project Properties->Configuration Properties->General and change Platform Toolset to V90;
Recompile the project;
Now, I've tried to run the application compiled this way on a virtual machine, mounting Windows 2000, but I get another error, this time: "The procedure entry point DecodePointer could not be located in the dynamic link library KERNEL32.dll".
Well, after some investigations I found that running MSVC10 applications on Windows 2000 is not possible. You have to build it with at most MSVC9 (Visual Studio 2008), or use the VS2010 Multi Targetting feature to let VC++2010 use the VC++2008 compilers and libraries. Please also refer to this Microsoft Connect discussion.
OK, some time has passed, but I'd like to give a definitive answer to this question of mine. Unfortunately, what I was asking for it's not possible. #vahancho's answer is right, and the solution he pointed out is correct for the majority of situations. However, DecodePointer is "included" in Windows XP SP 2 kernel, and it's not possible to compile an application using it for an older Microsoft OS, even by choosing the VC++2008 compiler.
An additional reference is given by this post on CodeProject.
Fortunately for me, my application was simple enough to let me rewrite it using the good old VB6 :)

How to get folder sharing on Windows Mobile emulator to work

I am developing an application using Windows Mobile 5.0, under embedded VC++ 4.0, and using the emulator for debugging. I need to copy some files onto the emulator and planned on using the option to map a directory to the emulator storage card. Problem is, this option is greyed out when I run the emulator. From the emulator help i get
'On the Emulator, run a Windows CE OS that supports the ability to connect to a directory on the development workstation. '
How do I accomplish this? I have seen the command line option /sharedfolder but can't get at this from platform manager under EVC++ 4.0. All comments welcome.
I have the WinMo 5.0 SDK installed on Visual Studio 2005 and the option to map a directory works fine for me. I'd guess it's an issue related to eVC, which is pretty old by now. My recommendation is to try VS 2005 or 2008, there's a free 90-day trial you can download from microsoft:
http://msdn.microsoft.com/en-us/vstudio/products/aa700831.aspx
Also, I'd note that VS is way better than eVC in many aspects. I used eVC and them moved to VS 2005, many "heavy templates" I had which wouldn't compile in eVC were compiled OK in VS 2005.

VS.Net 2005 required on Build box with .Net 2.0 C++ Projects?

We have a build box that uses CruiseControl.Net and has been building VB.Net and C# projects using msbuild. All I have installed on the box as far as .Net is concerned is .Net 2.0 SDK (I'm trying to keep the box as clean as possible). We are now trying to get a C++ app building on this box. The problem we are running into is that the header files (e.g. windows.h) are not installed with the SDK.
Do I have to install VS 2005 to get this to work?
Edit:
As a couple people have answered, I had actually downloaded the 3.5 Platform SDK, but the applications built on this box MUST run on boxes that do not have 3.5 installed. By installing the 3.5 SDK on my 2.0 build box, am I compromising my build box?
Edit:
I'm going to leave this as unanswered, but thought I would add that I went ahead and installed Visual Studio on the box and all is well. I hate having to do that, but didn't want to run the risk of having a 3.5 SDK on my 2.0 build box. I would still love to hear a better solution.
Visual Studio is not needed, but for C++ you need the Platform SDK as well:
http://www.microsoft.com/downloads/details.aspx?familyid=484269E2-3B89-47E3-8EB7-1F2BE6D7123A&displaylang=en
Edit: There is also one for Windows 2008/Vista, not sure which is the correct one:
http://www.microsoft.com/downloads/details.aspx?familyid=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en
No, you have to install the windows platform SDK.
You'll need to download this:
http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en
Edit: #Michael Stum
You need the Server 2008 / Vista / .NET 3.5 SDK version.
Depending on what you are using in C++ (MFC, ATL, etc) you are probably going to have to install Visual Studio Professional (not express) as a lot of the libraries and headers are part of Visual Studio and not included in the SDK or Visual Studio Express (if you are doing managed C++ using .Net as the main framework then installing the SDK will be enough). We run our build boxes on VM's and so like to have as little installed as possible, so I spent a fair bit of time trying to get things working by installing as little as possible and for our C++ I ended up having to install Visual Studio.
I don't see why having .NET 3.5 would comprimise the build box - 2.0 and 3.5 co-exist without a problem. The only concern I could see would be a developer upgrading a solution to VS2008 without your "permission" and the build not failing...
In general, you need some set of SDKs (Software Development Kits) to be able to build, and some set of redistributable packages to run.
In case it's not obvious, you should be testing your product on an otherwise clean machine before you ship, so you know you got the dependencies right.