Use Visual Tools without installing Visual Studio - visual-studio

I've a Windows Server 2012 for make my build every night. I want to use CMake to generate Makefiles with NMake. But I don't want to install a complete Visual Studio just to get the tools (compiler / linker).
I want to know if there is a way to do that or if I have to install visual imperative ?
I search on web but the answers i found are not so clear...
Thanks

The commmand line build Tools has been removed from the Windows SDK as of the "Windows SDK for Windows 8" release. Earlier SDKs included compilers. So if you use an SDK prior to the Windows 8 era you can go with the older SDKs.
If you new the current SDK version you need to install developer Tools like Visual Studio.

Related

How Develop Win32 and DirectX in VSCode

I want develop Win32 and DirectX in Visual Studio Code.
I already installed gcc, mingw.
OS is windows10.
How do I setting it?
See Microsoft Docs for details on developing C++ code with VS Code.
The latest DirectX headers and link libraries are found in the Windows 10 SDK. Using the Visual C++ or clang/LLVM for Windows toolsets are the best options for consuming the latest Windows 10 SDK.
You may find the DirectX Tool Kit a useful starting point, although my tutorials focus on the Visual Studio MSBuild build environment. I also reference using CMake. You can use MSBuild through Visual Studio Community, and you can use CMake through either VS Community or VS Code.

Targeting older Windows versions (Windows Server 2008 R2)

I have an older Windows 10 workstation with Rust 1.37 (stable-x86_64-pc-windows-msvc) and Visual Studio 2017 with the following features:
Visual C++ Build Tools core features
VC++ 2017 version 15.9 v14.16 latest v141 tools
Visual C++ 2017 Redistributable Update
Windows 10 SDK (10.0.17763.0)
Visual C++ tools for CMake
Testing tools core features - Build Tools
On this workstation, I can compile a program that runs fine on my target environment (Windows Server 2008 R2).
I have a newer Windows 10 workstation on which I installed the legacy version of Visual Studio 2017. Interestingly, the installer doesn't offer the exact same options for C++ build tools, but I think I have the necessary ones, e.g.:
VC++ 2017 version 15.9 v14.16 latest v141 tools
Visual C++ tools for CMake and Linux
Windows 10 SDK (10.0.17763.0)
However, when I compile the program (with the same Rust version/toolchain) on this computer, it errors out on my target environment with "The program can't start because VCRUNTIME140.dll is missing from your computer".
What am I missing here? How can I setup rustup/cargo to target my specific environment?
I think It’s because of not choosing some components when you install the vs.
by the way, vs 2015 is not a good choice.
So it turns out I was wrong: my project was not compiled with stable-x86_64-pc-windows-msvc on my older computer. I had at some point installed the x86_64-pc-windows-gnu toolchain and set it as the override for this project. Changing my toolchain to x86_64-pc-windows-gnu on the new computer produced a binary that was able to run on the target machine.
Rather than deleting this question, I'll leave it here for others who may need to target older Windows environments:
If you are having problems running a Rust binary on an older Windows computer, try compiling with x86_64-pc-windows-gnu rather than msvc.

How can I install and use build tools v120 (2013) on Visual Studio 2015 from a Windows 7 machine?

I need to build several C++ projects (originally developed with VS 2013) that require v120 build tools. I can only use VS2015 (due to licensing and other corporate formalities I cannot install VS2013).
As per multiple similar SO questions, such as this question or this question, it appears my only options are to:
Install VS2013 - (NOT POSSIBLE)
Use VS2015 installer to install Windows 8.1 and Windows Phone 8.0/8.1 - also NOT POSSIBLE since the machine I am using is running Windows 7 and Windows 8.1 and Windows Phone 8.0/8.1 just doesn't appear in the installer.
Retarget the projects to build using v140 - again NOT POSSIBLE as this will effectively render the projects unusable by my colleagues who also work with these projects.
Isn't there any standalone installer that I can use to install those build tools, or any other option I can try?
Isn't there any standalone installer that I can use to install those build tools, or any other option I can try?
I am afraid there is no such standalone installer that you can use to install the build tools v120 on the windows 7. Just as you found, the option Windows 8.1 and Windows Phone 8.0/8.1 Tools could not be installed on the windows 7.
But, there is a workaround to resolve this issue, install the Visual Studio 2013 express instead of Visual Studio 2013.
You can download it here.
Visual Studio 2013 express will resolve your licensing restriction, but I am not sure if it match your corporate formalities. If not, I think you can consider stijn`s suggestion "use $(DefaultPlatformToolset) as toolset instead of hardcoding the toolset to v140"
Hope this helps.

Visual Studio 2010 Express, Windows SDK 7.1, CMake and 64 bit

I'm running into problems generating a Visual Studio 2010 Express 64 bit project through CMake. I installed VS2010 Express first, then the Windows SDK 7.1 in order to be able to build 64 bit apps and then tried to compile my CMake project.
I do not remember this to be that difficult with 2008 Express, but with 2010 I fail again and again. 2010 searches per default for 7.0a SDK which is shipped with it. The express version seems to ship a reduced 32 bit version, which is located under
.../Program Files(X86)/Microsoft SDKs/Windows/7.0a
Windows SDK 7.1 64bit will be installed per default under
.../Program Files/Microsoft SDKs/Windows/7.0
In VS 2010 Express the platform SDK can be changed on a per-project-map basis and if I do so the inherited path macros surprisingly point to the correct SDK. The problem now is, that CMake is not happy about me screwing around in the project files by myself. Thus, it always resets the Platform SDK entry to the default value, which will make the Windows SDK point to 7.0a and result in complaints about missing 64 bit libs.
I now see two possibilities to resolve this:
Find a way to really integrate the 7.1 SDK into VS2010 Express, just like with VS2008. VS2008 searches the registry for the tag 'CurrentInstallFolder' in the Windows SDKs entry, and you can change this entry to point to another SDK.
Find a way to tell CMake (2.8.1) to set the correct Platform SDK in the project. No plan how to do this...
I would appreciate any help. 2010 is somewhat mandatory unfortunately, I personally cannot get used to it at all...
Ok, updating to the latest CMake (2.8.12) resolved this, CMake now detects the 7.1 SDK and sets it in the project files.
Edit: The toolset can be chosen in a CMake file via the CMAKE_GENERATOR_TOOLSET flag

Install WinCE 5.0 Platform Builder SDK - build code with Visual Studio 2012 or higher

I have a Windows CE 5.0-based Platform Builder image. It is intended to be installed on Visual Studio 2005. My team would like to upgrade our build tools to utilize Visual Studio 2012, but Visual Studio 2012 does not support this platform image.
To be clear; I am not asking whether or not Visual Studio 2012 (or higher) supports Platform Builder SDKs targeting Windows CE 5.0. That question has already been answered (more or less), and the answer is clearly "No."
Instead, what I'd like to do is install the Platform Builder SDK, and manually modify the Visual Studio 2012 environment to allow compilation of my Windows CE code. Features like remote debugging and deployment are acceptable losses to my team; we have our own pathway for deployment and debugging on our embedded device. What I'm really hoping to gain is simply the ability to build WinCE 5.0 code in VS2012, which was intended for VS2005. I am attempting to reduce the number of Visual Studio installations, and get access to the superior intellisense faculties of newer versions of Visual Studio.
Does anyone know if this is possible? How would I go about doing that?
There does not appear to be a way to do this, in such a fashion as to no longer require Visual Studio 2005.
You can, however, use registry hacks to force Visual Studio 2012 to build a WinCE 5.0 project by utilizing the compiler binaries from Visual Studio 2005, during compilation. This would allow you to develop code in VS2012, but would also require that VS2005 be installed for a successful build.
Here is an article explaining the steps to set this up.
VS2012 doesn't have any of the Windows CE compilers. The last one that shipped with compilers compatible with CE 5.0 was VS 2008, so that's the "latest" version you'll be able to use to build. (VS2012 is capable of building for Windows CE, but only for WEC 2013, and only after installing a WEC 2013 SDK, which includes the requisite compiler pieces).
In short, there's no way you can get VS2012 by itself to compile a CE 7.0 or earlier app.
There is a plug-in for VS 2013 that will allow you to use that IDE for managed code (I've never used it, so I can't say how well it works), but it still requires VS 2008 to be installed to get the compilers.

Resources