64-bit build on microsoft visual c++ express 2010 - winforms

I am trying to compile a vc++ project as 64 bit using visual c++ express 2010. i know that the 64 bit compiler does not come with the default installation of vc++ express so i installed windows sdk for windows 7 as specified here (http://msdn.microsoft.com/en-us/library/9yb4317s.aspx) which includes the 64 bit compiler as i understand. however, there is still no 64 bit option in the configuration manager for vc++. after some searching i found and completed this tutorial (http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/) as well as the various links at the bottom of this page. despite all my efforts, i still cannot get the 64 bit compiler to show in vc++. i have also tried reinstalling both vc++ and sdk. if anyone has any experience/tips with getting this to work i would really appreciate it. fyi - i am running windows 7(x64).

finally got this to work by uninstalling everything and reinstalling in the following order:
VS2010 C++ Express (in my case)
SDK 7.1
VS2010 SP1
SP1 Compiler patch KB2519277
once this is done, make sure to change the platform toolset to the windows sdk under project properties->configuration properties->general

Related

Backwards compatibility from Windows 95 [duplicate]

I made the mistake of thinking that the C++ program that I coded with VS 2012 would work on a computer running windows 95.
Now I know why it doesn't work. So I took a look at other free compilers such as Dev-C++ 5 but after going through the forum of the Dev-C++ web site, it seems that it also can't be used make Windows 95 compatible applications.
So my question is, what should I use to compile my C++ application in order for it to work on Windows 95 and all the other versions of windows from 95 to 8?
Edit : After no suitable answer.
I don't mind having to build a different .exe for different Windows versions.
Edit : Problem solved!
Thanks to everyone who help in this discussion.
Using MingW and code blocks it took me only 20 minutes to adapt the code to Win 95 friendly libraries... and a full day to install Win 95 in a VM lol.
First of all, why Windows 95? Well, anyway, you can use MinGW for that. Code::Blocks is my favorite IDE that's got MinGW. You can download it from here.
You need Visual C++ 2005 Express or Pro! It's the last version that'll support 95/98/ME. Anything newer will compile executables forcibly restricted to Windows XP-SP2 or above platforms.
You also have to mind the WinAPIs that you call as there are less of them available in 95, so you want to check with the MSDN library on everything you use to see if it's an original API that was available from day one (e.g. CreateFileA, ReadFile, CloseFile, etc.). I suppose if you code in ANSI "C" and use basic stuff you'll be OK, but it just depends.
FYI, the final MSDN library to complement a 2005 Visual Studio installation is "Microsoft Visual Studio 2005 (April 2007 Edition)" - you can find an ISO for that if you look, and Express was always free, just limited by the exclusion of a full graphical resource editor and other things.

Using Chromium Edge WebView2 on vs2015 & 32 bit application (limitation i have)

Does anyone succeed to works with WebView2 and chromium Edge on vs 2015 - 32-bit application?
I try the WPF .Net 4.8 sample at vs2015 and its works only at 64 bit,
I try also the c++ on vs2015 but I didn't succeed to make it works :-(
I try the latest release and pre-release.(v0.9.628)
if someone succeded and can share a snippet code, I will be happy :-)
Thanks
Oren

Win XP 64 bit and .NET 4.0 issue

I'm developing a WPF with WCF app on .NET 4.0, the machine in which is being developed is a Windows 7 64 bit SP1. The app has already been installed in several machines with different configurations (Win XP, Vista, 7, and even POS), summing up to a total of around 20 different machines.
Yesterday I went to install it on a new customer, and the app just crashed with no error message (probably due to my several try catches along the code). The only message that showed was something like: The App stopped working, Windows is trying to find a solution.
Tried different configurations and nothing, until I noticed that the client machine is a Win XP 64 bit, which I believe I've never came across until now.
I searched the web, and read somewhere that there was a compatibility issue with Win XP x64 and .NET 4.0. I don't know if this is the case.
Do I have to downgrade my app to .NET 3.5?? Or do I have to create a 64 version, or is it the client machine that has a problem?? I can't recreate the issue on my PS, even with Win XP installed on virtual machine, so I'm flying blind.
All you need is to install Windows Imaging Component, which is mentioned in .NET Framework download page,
http://www.microsoft.com/en-us/download/details.aspx?id=17851
Important: Make sure that your computer has the latest Windows service
pack and critical updates. To find security updates, visit Windows
Update. If you are installing on XP 64 bit or Windows 2003 you might
need to install the Windows Imaging Component. The Windows Imaging
Component 32 bit can be found here . The Windows Imaging Component 64
bit can be found here .
Anyway, you should debug the crash as #Daniel Hilgarth recommended, as that can tell if WIC is the culprit.

Windows forms app (visual studio 2010) compatibility issues

My task is to make a simple application that connects to the internet (using Wininet) and downloads a text file. It then displays the data in a listBox widget. The requirement was to make a GUI based application, so I used Windows Forms in Visual Studio Express 2010.
The application runs fine on my PC, however I realized that it runs only on my PC. I installed .Net 4 and Visual Studio 2010 redistributables on another PC and it worked fine there. Now, the person for whom I'm making this wants maximum compatibility on windows PCs. I'm totally stuck here.. should I switch to an older version of VSE?
From what I could search, using /MT instead of /MD would cause the application to link statically, however my app also uses /CLR and these are incompatible.
Any ideas?
Note: I've previously made a similar app (downloading and displaying) with console output and it works perfectly fine everywhere.
Dependens on what is meant by "maximum compatibility on windows PCs". If you can bundle the required redistributables, your program should run (as you found on the second PC), as long as the windows on the PC is capable of executing the binaries (e.g. not a 32 bit PC trying to execute 64 bit binaries)
I have been in your situation.
I can give you my free .NET-application-runner (RunNetApp.exe) that automatically installs .NET Framework 4 before running your application for the first time. If the framework is already installed on target machine, it only runs your application.
I also suggest changing application's framework to ".NET Framework 4 Client Profile". It's setup is about 40MB (in comparison to 200MB of full ".NET framework 4").
Is it helpful?

Compiling 32-bit application using Visual Studio on a 64-bit machine

I'm trying to compile a simple 32-bit Hello World application written in C using Visual Studio 2010 on a 64-bit machine on a Windows 7 fresh install. I also installed the "Windows SDK for Windows 7 and .NET Framework 4" after installing Visual Studio.
I built the application selecting "Win32" as platform. It works on Windows 7 but if I run the application on my 32-bit machine with Windows XP Professional (fresh install also this, without softwares and Service Packs) it seems not working getting this error:
"This application has failed to start because msvcr100.dll was not found"
If it can be useful Dependency Walker detects 2 errors (see the linked picture for details):
"Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module."
"Error: Modules with different CPU types were found."
http://img820.imageshack.us/img820/4725/errordp.png (PIcture)
How can I solve it? Thanks!
The machine on which it is run needs the runtime libraries. See this MSDN information.
Don't trust Dependency Walker on this... It clearly shows your exe is 32 bit. Your problem is with the VC redistributables, which are the CRT dlls - look for vcredist_x86.exe in your VS installation. You should run it before you run your app.
Another option is to statically link the CRT. See the /MT option. Will make your exe larger, but save the vcredist stuff.
The problem here is the C runtime used by the compiled program is missing on the Windows XP machine. Visual Studio 2010 will by default us the 10.0 (msvcr100.dll) runtime which is not available on XP by default. You need to manually deploy the C runtime on your machine in order for your program to run.
You may want to read the following MSDN article which discusses the issues around deploying C applications built with Visual Studio 2010
http://msdn.microsoft.com/en-us/library/zebw5zk9.aspx
There may be additional 32 / 64 issues at work but this appears to be the primary problem
The answers about the runtime library are correct. Another possible solution is to link to the static runtime libraries rather than to the DLL versions. This way you can build an executable that you can drop onto any machine without extra deployment hassles.
It's a trade-off, but, without knowing more about your situation, it might be worth considering.

Resources