Opening VS 2012 C++ Project in VS 2015 gives Build error - c++

We have a C++ Project built in VS 2012 (To generate .arx files to work with AutoCad 2014). Now we need to recompile it in VS 2015. we have not installed VS 2012. I opened the project in VS 2015. Properties -> General -> Platform toolset is set to Visual Studio 2015 (v140). Still we are getting "The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools."
we created a simple C++ Console application and ran it. Works fine no build error there.
Need to recompile the files for building .arx files to work in AutoCad 2018.
Initial Project Load :->
In the initial project load itself for Nimcad and planact we are getting build tools error. But not for engr.
Build on engr Project getting errors this might be the changes in ObjectARX 2018 I don't know. If you have a solution for this error please let us know:->
Buid on Nimcad Project :->
Build on Planact Project :->
For both Nimcad and planact all we get is build tools error.
Property Pages :
Any help please.

To build AutoCAD 2018 ObjectARX app you'll need Visual Studio 2015 Update 3 configured (by default) with VC14.0. As you are migrating a project, make sure to adjust all libraries (.lib files) to version 22. Did you download the ObjectARX 2018 SDK?
Update
This seems a problem with your Visual Studio installation. If you create a new C++ project, VS should also ask you to install the missing parts.
In Visual Studio 2015 (...) the C++ compiler, libraries, and project templates have been moved into an optional feature. (...) To install the various components needed for desktop and mobile development in C++, you must choose “Custom” and manually select those items (Visual C++ Team Blog)
You may need to re-run VS setup and select the C++ related parts (as already mentioned on the question comments).
Finally, check your VisualStudioVersion using the VS2015 Command Prompt:

Related

TFS 2018 build fails: cannot open include file 'afxres.h'

We are testing a new new TFS 2018 SP1 server.
I was previously building a solution (4.5) which contains two unmanaged C++ projects originally written against the 2012 toolset.
Building that solution as-is on the new server worked fine. However, we have decided to retarget to 4.7.1 for our next release.
After making all the changes in the projects including targeting the 4.7.1 framework and the 2017 toolset (141), these projects fail to build with the error in the title.
I know this has to do with the C++ MFC/ATL redist.
The build server does not have VS 2017 installed and I do not want to install it unless absolutely necessary.
I did install the VS 2017 C++ redists x86 and x64 but it did not correct this.
Can anyone help me on that?
You need to at least install Build Tools for Visual Studio 2017 on your build server.
Build Tools for Visual Studio 2017
These Build Tools allow you to build native and managed MSBuild-based
applications without requiring the Visual Studio IDE. There are
options to install the Visual C++ compilers and libraries, MFC, ATL,
and C++/CLI support, and .NET and .NET Core support.
If that still not work, I'm afraid that you have to install the VS 2017 on the build server. (Note that do not miss the feature Microsoft Foundation Classes for C++ .)
UPDATE:
Please double check if you missed the Microsoft.VisualStudio.Workload.VCTools workload on the build server. See Visual C++ build tools for details.
If missed , just try using below command to install it:
vs_buildtools.exe --add Microsoft.VisualStudio.Workload.VCTools

Changing target to x64 breaks the FLTK build in Visual Studio 2017

I'm trying to build the FLTK version 1.3.4 which you can find from http://www.fltk.org/software.php in Visual Studio 2017.
I unzip everything, navigate to the ide/VisualC2010/ folder, and open the fltk.sln file in Visual Studio 2017.
Visual Studio asks if I would like to upgrade project targets to the latest Microsoft Visual Studio 2017 toolset. The upgrade options are Windows SDK Version: 10.0.16299.0 and Platform Toolset: Upgrade to v141. I press OK.
At this point if I do Build->Build Solution (Ctrl Shift B), everything works. However I noticed that the target is Win32 and I would like to also compile the library so I can link against x64 programs.
I go to Build->Configuration Manager and then in the Active Solution Platform->New... and Type or select new platform: x64 and Copy settings from: Win32 and Create new project platforms [checked] and then I press OK. This takes a while to complete.
Repeating step 3 no longer succeeds, with many projects failing with fatal error c1041: cannot open program database ...
I am pretty much a beginner at Visual Studio and I don't really understand what I'm doing. Can someone clue me in on what is happening here?
Fixed it by going to Tools -> Options and then Build and Run and then I changed maximum number of parallel project builds from 4 to 1.

Using UE4 with Visual Studio 2017

I recently did some cleaning of my drives. I decided to install visual studio 2017 after cleaning the drives up. I have been trying to continue work on my old UE4 project using the engine pulled from GitHub. I tried rebuilding the project with VS2017 which I know is not fully supported yet. I did run into quite a few problems, including the missing corecrt.h files. I reinstalled the Windows SDK to fix this.
The current problem is a new missing file called windows.h, and I believe it is missing due to the build tools looking for the wrong version of the SDK. I was wondering, has anyone else successfully integrated Visual Studio 2017 with their UE4 project after running into similar problems?
-- Edited due to poor grammar.
As I know Version 4.15 supports both Visual Studio 2015 (default) and Visual Studio 2017. If you are building the Engine from source code, you would want to open a command prompt after running Setup.bat and run the command GenerateProjectFiles.bat -2017. This will give you a Visual Studio 2017 solution for the Engine.
To use Visual Studio 2017 for projects, you can set your preference for which version projects use by going to Edit -> Editor Preferences -> General -> Source Code and choosing Visual Studio 2017 in the Source Code Editor setting.
If regenerating the Engine's VS project files doesn't help. Try regenerating your own UE4 project's VS project files.
With Visual Studio and UE4 closed, find the .uproject file, right click and select Generate Visual Studio project files.
Open the solution, make sure your UE4 game (e.g. MyProject) under the Games folder is set as the StartUp project (right click, Set as StartUp project), then try a compile.

Adding dependencies to a setup project Win32 application Visual Studio

Hi I am looking to create a setup project for my Win32 application developed using Visual Studio 2013. I have created the setup.exe using InstallShield However now i also need to add dependencies which should be installed along with the required application when setup.exe is run.
The dependencies are simply Visual C++ Redistributable for Visual Studio 2015.
I went through this article for creating the setup.exe for my application. But I did not find any documentation which directs me how to add dependencies to this installer.
I found this document which describes a walkthrough for adding dependencies but that is no more possible in Visual Studio 2013 as much as I am aware. Now we 'NEED' to use Install Shield. Correct me if I am wrong.
Please direct me to some documentation which will guide me to add dependencies to my setup project.
UPDATE
I found in the InstallShield Project Assistant an option to check for installation requirements. But it requires you to specify the directory to search the particular file. As far as I know the Visual C++ Redistributable package is not installed in any particular location but the only way to detect its presence is to check if the registry key is set to 1.
So instead of checking I'd rather always have the setup file to install the Visual C++ Redistributable package no matter it is present or no.
But even for that how do I go about it?
There might be other reasons you need to use InstallShield that I'm not aware of, but in the simple case of a C++ app that needs the runtime as a prerequisite, I'd use Visual Studio 2015 (Community Edition will do) and add the Installer project extension. The project properties lets you build a prerequisite installer (a setup.exe) and among the choices are the VC++ runtimes. That's just an exe that does its checks and installs if required.
I'm not sure how you got a VC 2015 C++ requirement while developing with VS 2013. Again, VS 2013 also has a community edition and an installer project extension that will install the VS 2013 C++ prerequisites.
The redistributable installers have their own checks to see if they need installing. I wouldn't expect InstallShield to require you to know the detection rules of a C++ runtime. that's a bit odd. There may be another setting where you just say C++ runtime required.

Is there a way to list library dependencies in Visual Studio?

I'm trying to build a C++ project with Boost and Cinder on Windows Server 2008 with MSBuild without success. I've build the same project on my Windows 7 machine under VS2013 and MSBuild, however on the server it is saying that it can't open a library by the name of "threadsafestatics.lib"
I've never heard of threadsafestatics.lib and my Google-foo hasn't brought me any luck finding anything about it online.
Is there a way to find out what part of my project is depending on this library?
Providing debug level output for the build process helped to work around the problem:
Tools->Options->Projects and Solutions->Build and Run->MSBuild project build output verbosity
threadsafestatics.lib is a new library from the November 2013 CTP. If you are compiling with the CTP, you must add its installed lib folder to Project > Properties > VC++ Directories > Library Directories.
If you installed the CTP to its default location on a 64-bit machine, the path is C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\lib
You can also use the macros $(VC_CTP_Nov2013_LibraryPath_x86), $(VC_CTP_Nov2013_LibraryPath_x64), or $(VC_CTP_Nov2013_LibraryPath_ARM) depending on your target architecture.
If you had installed "CompilerCTP.Nov2013"Patch package, and using toolset of ctp2013,you can try to change toolset into 2013 with the following steps:
project -> property ->config property -> platform toolset ->Visual Studio 2013 (v120).