Afx Unsupported in Windows 10/ Visual Studio 2015 - c++

I retargeted an MFC solution from Visual Studio 2013 to Visual Studio 2015, but when I built it I received an error telling me the compiler could not find afxdisp.h normally found under VC->atlmfc->include . -- Of course I copied the file from the VS 2013 location, but I was wondering why it was missing? Does anyone know?

My mistake, MFC is an addon in VS, and I did not have all of it (only had ATL). I relaunched installer went to custom install and clicked MFC classes. I also installed the Multibyte MFC library from the Visual Studio Website. It is not available in the custom options.

Related

MFC multibyte support

I got a build error MSB8031 and I was redirected to Microsoft where it says
The Unicode and MBCS MFC DLLs are installed with the Desktop development with C++ workload when you select MFC and ATL support from the Optional Components pane.
I went there by going to the contral panel / programs and features, using "change" on the Visual Studio 2017 entry.
Since the entry "MFC and ATL support" did not exist, I followed the next advice:
If your installation does not include these components, navigate to the File | New Projects dialog and click the Open Visual Studio Installer link.
It seems to open the exact same window and there is no entry called "MFC and ATL support".
How do I get multibyte support in VS 2017, version 15.9.12?
Note that there is both "Visual C++ ATL for x86 and x64" and "Visual C++ MFC for x86 and x64" already checked, if that was meant.
These steps apply for Visual Studio 2017. If there are Visual Studio 2013 projects in the solution, opened with VS2017, you may see this:
In that case, you have to install Multibyte Support for Visual Studio 2013, not 2017.

ATL is not working when migrating to Visual Studio 2015

I have a project which uses an ATL component to create pie charts. It's working fine in Visual Studio 2010 but when I migrate it to Visual Studio 2015, its not working or not instantiated. It's crashing at runtime
I have installed VS 2015 with the C++ support on Windows 7.
I have set the platform toolset to v140.
I have installed the VS 2015 x86 redistributable package .
Target platform version 8.1.
Tried adding ATL support in existing MFC project by ATL wizard. This causes crash in ATL (_pModule == 0) and some Dlls also not registered due to this change so I had to revert the changes.
Why do you add ATL again support?
As far as I understand your question this is an existing project and has ATL support! The ASSERT simply tells you that you have two ATL modules.

Open a vdproj file with VS Community 2017?

I retrieved a C++ VS project from 2011 and it has a Install-win32.vdproj I guess it has to be the file I need to open in order to build the project.
Unfortunately Visual Studio 2017 seems not to recognize this kind of file. Is there any ways to interpret it or convert it?
For VS2017, use the Microsoft Visual Studio Installer Projects. Download link is below. Be sure to close Visual Studio before running the installer:
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2017InstallerProjects

Visual Studio c++ download and excecution for new computer with windows 8.1 64bit

I just bought a new computer, with Windows 8.1 64bit installed and wanted to start developing in C++.I am new to Visual Studio, I used to do it with eclipse but suggestions I found in the internet were to prefer Visual Studio.
I tried to download Visual Studio C++ 2008 redistributable package (x64) from here http://www.microsoft.com/en-us/download/details.aspx?id=15336.
But I couldn't find where it was stored in my computer, after searching it with key words. Then I uninstalled it, to install again from scratch.
To uninstall it I opened my control panel and it saw that I have Microsoft Visual C++ 2012 Redistributable (x86) installed already, assuming it comes with the computer I bought, and the date of installation matches this. I can't find though where it is stored so I can't open it.
When downloading Visual Studio 2008, it says I need to uninstall previous Visual Studio versions.
Bottom line:
Should I uninstall the Visual 2012 (x86) that probably came with the computer (which is 64bit)? Or should I use it (and try to find where is it located)?
If I shouldn't use the 2012: Was the 2008 version I tried to install good? (2008 gives an "old" intuition, but just my intuition).
Is there an easy way to find out where the application is located for excecution? Any specific file to look for?
thank you
You want to download thee actual Visual Studio IDE from http://www.visualstudio.com/ . Try downloading the free Community Edition for a start.
The Visual Studio redistributable packages are actually the minimal runtime libraries to run C++ programs that were compiled with visual studio. You got a version installed by default even on fresh computers, otherwise you can't run many programs (they are also included with the IDE).
The redistributables are also often bundled with installers to make sure that others can run your programs.
The VC++ Redistributable packages only include the libraries required to run applications built with the respective version of Visual Studio (for example Microsoft Visual C++ 2012 Redistributable is for Visual Studio 2012).
It does not include any version of Visual Studio.
You could uninstall Microsoft Visual C++ 2012 Redistributable (x86) but however as it was preinstalled on your computer, I imagine that some program pre-installed by the computer manufacturer requires it. It's probably not a good idea to remove that.
So no, it's not a good idea to remove it.
In order to use the 2012 version of Microsoft Visual C++ 2012 Redistributable you should install the vs120 compiler, aka the VC++ compiler that comes with Microsoft Visual Studio 2012.
For developing with Microsoft Visual Studio 2008, using Microsoft Visual C++ 2008 Redistributable is completely fine as it matches the compiler version. However if you want to use the newer 2010, 2012, 2013, and 2015 versions you need to use those respective versions of the Microsoft Visual C++ Redistributable.
If you wish to use an up-to-date version of Visual Studio, try the Visual Studio 2013 Community Edition, or if you're feeling adventurous try the Visual Studio 2015 Release Candidate.
The application you built is always located in the project's directory, under /Debug or /Release, depending on whether you built a debug or release version of the application. If you do not know where your project folder is located you may right-click your project in the File pane and click Open folder in Windows Explorer.

MBCS Error building MFC C++ project with Visual Studio

I opened my existing MFC project using Visual Studio and when I build I get the following error message:
Error 1 error MSB8031: Use of MBCS encoding in MFC projects require an additional library to be downloaded and installed. Please see http://go.microsoft.com/fwlink/?LinkId=286820 for more information. C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\v120\Microsoft.CppBuild.targets
What is this about?
This error message is due to the missing MBCS MFC package. Starting with Visual Studio 2013, MBCS portion of the MFC library has been broken out of the Visual Studio product into its own separate download. Installing this package and rebuilding should fix the problem.
The download is available here
More information about this change is available here
Update for Visual Studio 2015
Starting with Visual Studio 2015, the entire MFC C++ library (including the MBCS pieces) is an optional install component. While installing VS2015, if you select C++ and MFC, you will also get the MBCS library.
Instead of installing an add-on, you may consider changing the character set from MBCS to Unicode.
This is done in the project properties as is depicted below.
For Visual Studio 2015:
According to Redistributing the MFC Library article on MSDN, there are no mfc140.dll files in redist directory (c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86).
The mfc140.dll files were omitted from the redistributable files
directory in Visual Studio 2015 RTM. You can use the versions
installed by Visual Studio 2015 in the Windows\system32 and
Windows\syswow64 directories instead.