C++ Visual Studio 2013 - additional include directories priority - c++

I'm migrating a Visual C++ 6.0 project to Visual Studio 2013. After solving many issues I'm stucked at the following problem. I have in my project path a folder with windows sdk .h files ( not all .h. files ).
In the old project I've had in additional include directories the following path : ..\..\sdk\include and the project builds succesfully. But, when I try to add the same path in Visual Studio 2013 I have over 100 errors regarding one of the header files from the sdk folder. (undeclared identifier)
My question is, how do I configure the Visual Studio project in order to search first in ..\..\sdk\include for some of the windows sdk files and then into the default windows sdk folder ?

Related

Working with Visual Studio C++ project in Visual Studio Code

I have a C++ project in Visual Studio and I much prefer Visual Studio Code for editing source files.
Is there a way to work with Visual Studio C++ projects in Visual Studio Code? Like getting include paths from ".sln" file or maybe even running MSBuild.
Open Developer Command Prompt/PowerShell for VS 2019. This will set necessary environment variables such as include paths.
Navigate to the directory of your project.
Type code . to start VS Code in your current directory.
Now, you will be able to use commands like cl, msbuild etc in the integrated terminal.
Happy coding.

Cannot open include file: 'atlrx.h' in Visual Studio 2019

We are upgrading the compiler from Visual Studio 2013 to Visual Studio 2019.
Getting the below error while building the project which used regex expressions:
Cannot open include file: 'atlrx.h': No such file or directory
After installing the ATL/MFC Components also atlrx.h is not fond in the VS include directory.
Does anyone have any idea like which component should be installed to get rid of this error?
Thanks in advance.
You should download ATL server from Codeplex and install the files.
ATL Server: Visual C++ shared source software
And then copy the include file to a folder on your hard disk, Atlrx.h normally lives in the $(VCInstallDir)VC\atlmfc\include folder.
You should make sure that this path is added in the include directories of visual studio.

How to include a project to another project in visual studio 2012

In my visual c++ project i include some codes of other projects.I got confused about how to do next step.Should i add projects or reference project.
You can directly add another project to current solution.
From Visual studio -----> File->Add->Existing Project..

Visual Studio 2012 using platform toolset v100. Cannot open source file "atlbase.h"

I am using Visual Studio Ultimate 2012. I have a project that works when i use the default v110 platform toolset.
Now I would like to add the Point Cloud Library (PCL) to this project to further work on it. Unfortunately there are only binaries available for Visual Studio 2010. I first tried to compile the 2012 binaries myself but that turned out to be more trouble than its worth. So i changed my platform toolset to v100 in order to use the PCL prebuilt binaries.
However, when doing so, one of my includes (atlbase.h) is no longer recognized. I have tried to manually include this by adding the Include and Library Directories of ATL in the project properties. This generated a whole lot of new errors, originating from the atl header files, which seems odd. I have also tried changing the option "Use of ATL" to "Dynamic Link to ATL" and "Static Link to ATL" from the default "Not Using ATL" to no avail.
I'm working on a 64 bit Windows 7 Ultimate machine and want to compile in 32 bit.
Edit: Using Process Monitor I have found that Visual Studio is looking for the include file in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlbase.h.
This folder (..\atlmfc) does not exist.
My VS2012 is installed at D:\School Programs\Visual Studio 2012
Is there a fix for this?
When you Switch to another different toolset this complete toolset must be available. This includes also the header files.
It should be possible without great Trouble to convert this DLL into VS 2012. Or myabe you can include the complete source without using a separate DLL.
Download and install WDK 7.1 (microsoft.com/en-us/download/confirmation.aspx?id=11800)
Create an environment variable which points to the installation directory, I called mine WINDDK
Go to project Properties -> VC++ Directories
Add $(WINDDK)\inc\atl71 to Include Directories
Add $(WINDDK)\lib\ATL\i386 to Library Directories (this is for 32 bit)
Go to project Properties -> Linker -> Input
Add atl.lib to Additional Dependencies
These steps have solved my problem

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).