visual-studio-2010

/Za compiler directive does not compile system headers in VS2010

青春壹個敷衍的年華 提交于 2019-12-29 01:36:36
问题 I wanted to disable language extensions to be able to do some tests in my project. I found that I must set /Za compiler directive from http://msdn.microsoft.com/en-us/library/0k0w269d.aspx, but after this I have errors if I include windows headers. Is there a way to write standard compliant code(enforced by the compiler, not by other programmers/code reviews) in VS2010 and still use system headers? Thanks you! 回答1: The windows headers have never compiled with /Za. There are other problems as

How to add a manifest file to a project in visual studio 2010?

时光怂恿深爱的人放手 提交于 2019-12-28 18:04:35
问题 I am trying to add a manifest file to a project with Visual Studio 2010, so as to set the project to be compatible with Windows 7 and to disable the virtualization. The problem is that in my Visual Studio 2010 there is no option "Application Manifest File" to choose when I want to add a new item. I can generate a manifest file when building the project, as I set the property in the Linker to do so. But can I modify that file to add the compatibility property to it? Is there some way to create

How to add Poco library in Visual Studio 2010?

我只是一个虾纸丫 提交于 2019-12-28 12:34:27
问题 It's been a while since I've programmed in C++ and right now I'm struggling with this Poco library I'm trying to add to do some HTTP requests. First of all, where do I add poco files, somewhere in my project perhaps? Secondly, I've read something about command prompt and running a script that will compile files but I have to give it an argument which is my visual studio version and the choices are from 70 to 110. How do I find out which one I should use? If someone could provide me a step-by

How to add Poco library in Visual Studio 2010?

為{幸葍}努か 提交于 2019-12-28 12:33:26
问题 It's been a while since I've programmed in C++ and right now I'm struggling with this Poco library I'm trying to add to do some HTTP requests. First of all, where do I add poco files, somewhere in my project perhaps? Secondly, I've read something about command prompt and running a script that will compile files but I have to give it an argument which is my visual studio version and the choices are from 70 to 110. How do I find out which one I should use? If someone could provide me a step-by

error MSB3411: Could not l oad the Visual C++ component “VCBuild.exe”

僤鯓⒐⒋嵵緔 提交于 2019-12-28 11:57:28
问题 I have Visual Studio 2010 with SP1 and Windows sdk 7.1. I also have VS2012 and Windows kit 8. when i run Windows SDK 7.1 Command Prompt and run node-gyp build --msvs_version=2010 it gives me error: error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Fr amework 3.5, or 2) install Microsoft Visual Studio 2008. Is it trying to find VCBuild.exe. I found that vcbuild

Why does the Stack Trace shows my development files path?

浪子不回头ぞ 提交于 2019-12-28 11:44:13
问题 Visual Studio 2010 SP1, compiled WCF app, put it on a server, and of course it got an error on the first run (what's new), outputted Stack Trace to log file. It's seeing the path to my development environment. Why? Is it because I deployed it as Debug compared to Release or is there something else, or shall I be more careful about outputting Stack Traces regardless? 04/09/2012 03:58:46: Error: Object reference not set to an instance of an object. at App1.Logging.LogMessageToFile(String msg,

How come you cannot catch Code Contract exceptions?

家住魔仙堡 提交于 2019-12-28 08:11:52
问题 System.Diagnostics.Contracts.ContractException is not accessible in my test project. Note this code is purely myself messing around with my shiney new copy of Visual Studio, but I'd like to know what I'm doing wrong. I'm using the professional edition of VS, therefore I do not have static checking. In order to still use code contracts (which I like) I figured the only way my method can work is to catch the exception that is thrown at runtime, but I'm not finding this possible. TestMethod

How to change the build type to Release mode in cmake?

无人久伴 提交于 2019-12-28 08:08:16
问题 I am trying to build a project in Release mode. By default it is built in debug mode. I am setting the variable CMAKE_BUILD_TYPE to "Release" in CMakeLists.txt . But it is still building the project in debug mode. When I pass "Release" as the build type in the CMake command, it still does not work. The CMake command that I am using is: cmake -G"Visual Studio 10" -DCMAKE_BUILD_TYPE=Release -H"source_path" -B"Build path" Please provide a solution if any. 回答1: Use it as you do it but in the root

How to change the build type to Release mode in cmake?

爱⌒轻易说出口 提交于 2019-12-28 08:08:09
问题 I am trying to build a project in Release mode. By default it is built in debug mode. I am setting the variable CMAKE_BUILD_TYPE to "Release" in CMakeLists.txt . But it is still building the project in debug mode. When I pass "Release" as the build type in the CMake command, it still does not work. The CMake command that I am using is: cmake -G"Visual Studio 10" -DCMAKE_BUILD_TYPE=Release -H"source_path" -B"Build path" Please provide a solution if any. 回答1: Use it as you do it but in the root

Visual C++ “Debug Assertion Failed”

和自甴很熟 提交于 2019-12-28 06:50:53
问题 I had compiled a code using Visual Studio 2010, then I tried to run it, unfortunately during testing sometimes I had errors "Debug Assertion Failed!"....Expression (unsingned)(c+1)<=256 Then I tried the same scenario but using gcc and it ran without any problem. any idea how about this problem? 回答1: You're calling a function like isalpha() or isdigit() with an integer whose value is not a single byte 0-255. 回答2: There is a piece of code that says "at this point, we expect the expression