visual-c++-2015

Binary compatibility between VS2017 and VS2015

守給你的承諾、 提交于 2020-01-11 10:13:43
问题 This SO post: Is Visual-C++-2017 binary compatible with VC++-2015? clearly says that VS 2017 is binary compatible with VS 2015. It even looks like the official position. My question is, in the past, I distinctly remember running into linker errors (I do not recall the specific set of errors) every time I try to link in a static library that was compiled with a different version of MSVC into an EXE that is being built with a newer version of MSVC. Yet, binary (in)compatibility sounds like

How to detect if Visual C++ 2017 Redistributable is installed

孤街浪徒 提交于 2019-12-28 15:11:44
问题 With Microsoft changing the pattern of registry entries in its latest versions, how do i detect if Visual C++ 2017 Redistributable is installed on a machine? My aim is to install VC++2015Redist since the software is written using VS2015. If i can successfully detect VC++2017Redist on a machine, then I skip my installation of VC++2015Redist 回答1: The 2017 VC++ Redistributable installation upgrades/REPLACES the 2015 installation Installation of the Visual Studio 2017 Redistributables upgrades

Use C++ DLLs from the same VS compiled at different times/teams - ABI compatibility?

百般思念 提交于 2019-12-23 07:59:27
问题 To repeat: I'm looking for ABI compatibility between libraries of the same Visual-C++ version! We want to mix and match some internal C++ DLLs from different teams - built at different times with different project files. Because of long build times, we exactly want to avoid large monolithic builds where each team re-compiles the source code of another team's library. When consuming C++ DLLs with C++ interfaces it is rather clear that you only can do this if all DLLs are compiled with the same

Can Visual C++ 2017 Redistributable package support the applications that use VC2015?

老子叫甜甜 提交于 2019-12-22 07:04:32
问题 If i install just Visual C++ 2017 Redistributable on my machine, can it support applications that was written for 2015 in other words, if I uninstall Visual C++ 2015 Redistributable and install Visual C++ 2017 Redistributable , will all the applications work without any errors? 回答1: No they won't work The redistributable package is a .exe, which installs the required DLLs msvcrtXXXX.dll Where XXXX changes per build (VS2017, VS2015,...) It is also not reference counted, which means no matter

Enforce ANSI C Standard in Visual Studio 2015

主宰稳场 提交于 2019-12-13 14:17:21
问题 I am trying to get Visual Studio to enforce the ANSI C standard when compiling a project, but I can't get it to work. Any tips? I have read all the tutorials, I enabled the /Za option, and named my file as .c (not .cpp). However, the following program still builds successfully: #include <stdio.h> void main(void) { for (int i = 0; i < 10; i++) { } int f = 0; } But it shouldn't. It would have to be like this to respect the ANSI C standard: #include <stdio.h> void main(void) { int i; int f = 0;

How to keep spaces within angle brackets of C++ casting operators in Visual C++ 2015?

故事扮演 提交于 2019-12-11 01:38:34
问题 I want to format my C++ casting operators this way: Class * foo = static_cast< Class * >( bar ); Visual Studio insists on removing the spaces within the angle brackets: Class * foo = static_cast<Class*>( bar ); How do I prevent it from doing so? 回答1: Go to Options > Text Editor > C/C++ > Formatting > Spacing , and check the (wrongly named) Insert space within parentheses of a C-style cast box. For some reason, it also applies to the angle brackets of C++ casting operators. 来源: https:/

libgit2 with libssh2 and libopenssl on windows

99封情书 提交于 2019-12-10 12:13:57
问题 I’ve tried before and had little success in the full build but even that fails now and I'm obviously missing something on windows (and yes its probably windows :P) can someone walk me through finding the correct OpenSSL to compile with libssh2 actually cmake/compiling libssh2 into libgit2 cause it keeps saying cannot find libssh2 and I'm struggling to build it again. I'm using CMake gui For windows, trying to build a VC2015 project The error I was getting when building libgit2 is checking for

range-v3 how to action::join with delimiter

半世苍凉 提交于 2019-12-08 12:41:39
问题 I get range-v3 for MSVC from git. And compile by MSVC C++14 compiler. Consider code: auto getter2 = [](const std::string&r) { return r+r; }; std::vector<std::string> vv = { "11","22", "33" }; std::cout << (vv | view::transform(getter2) | action::join) << std::endl; It works as expected. But I want to add delimiter to join and if I write std::cout << (vv | view::transform(getter2) | action::join(",")) << std::endl; The code does not been compiled. What is wrong? Mass of compiler error is below

Can Visual C++ 2017 Redistributable package support the applications that use VC2015?

强颜欢笑 提交于 2019-12-05 10:35:31
If i install just Visual C++ 2017 Redistributable on my machine, can it support applications that was written for 2015 in other words, if I uninstall Visual C++ 2015 Redistributable and install Visual C++ 2017 Redistributable , will all the applications work without any errors? No they won't work The redistributable package is a .exe, which installs the required DLLs msvcrtXXXX.dll Where XXXX changes per build (VS2017, VS2015,...) It is also not reference counted, which means no matter how many people install it, one uninstall rips out the files. UPDATE The Visual Studio 2017 does not change

Why does FormatMessage only create partial messages for ERROR_SYSTEM_PROCESS_TERMINATED and ERROR_UNHANDLED_EXCEPTION system errors?

和自甴很熟 提交于 2019-12-05 06:58:23
问题 I have been using the FormatMessage function within the Windows API to generate message strings from system error codes. I noticed that for some error codes the full message doesn't appear to be created. Take this sample program as an example: int main() { wchar_t * buffer = nullptr; FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, ERROR_SYSTEM_PROCESS_TERMINATED, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), reinterpret_cast