visual-studio-2010

Integrate Google Protocol Buffers .proto files to Visual C++ 2010

梦想与她 提交于 2020-12-24 16:16:12
问题 I've added a custom build step to my Visual Studio project files which generates the google protobuf .h/.cc files from the .proto input files. But I've been wondering if it's possible to start a compile only if the content of the proto files has changed? Is there a way to tell VisualStudio from a custom build step exactly that? What is the optimal way to integrate proto files into a visual studio build solution? At the moment, at every build the .proto file is updated which then also updates

Integrate Google Protocol Buffers .proto files to Visual C++ 2010

冷暖自知 提交于 2020-12-24 16:15:45
问题 I've added a custom build step to my Visual Studio project files which generates the google protobuf .h/.cc files from the .proto input files. But I've been wondering if it's possible to start a compile only if the content of the proto files has changed? Is there a way to tell VisualStudio from a custom build step exactly that? What is the optimal way to integrate proto files into a visual studio build solution? At the moment, at every build the .proto file is updated which then also updates

Integrate Google Protocol Buffers .proto files to Visual C++ 2010

一个人想着一个人 提交于 2020-12-24 16:11:32
问题 I've added a custom build step to my Visual Studio project files which generates the google protobuf .h/.cc files from the .proto input files. But I've been wondering if it's possible to start a compile only if the content of the proto files has changed? Is there a way to tell VisualStudio from a custom build step exactly that? What is the optimal way to integrate proto files into a visual studio build solution? At the moment, at every build the .proto file is updated which then also updates

Looking for a more dynamic designer TypeConverter serialization in a VS10 .NET form

帅比萌擦擦* 提交于 2020-12-13 04:24:05
问题 I have a list of a class which I serialize to the designer generated code with the following code: internal class TargetSettingsConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType ==

Looking for a more dynamic designer TypeConverter serialization in a VS10 .NET form

为君一笑 提交于 2020-12-13 04:23:25
问题 I have a list of a class which I serialize to the designer generated code with the following code: internal class TargetSettingsConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType ==

error LNK2019 unresolved external symbol virtual class

筅森魡賤 提交于 2020-12-05 13:24:32
问题 I know this question was asked several time, but i don't find how to resolve it. I get this error when i'm trying to build my project: error LNK2019: unresolved external symbol "public: virtual __thiscall IGameState::~IGameState(void)" (??1IGameState@@UAE@XZ) in function "public: virtual __thiscall MenuState::~MenuState(void)" (??1MenuState@@UAE@XZ) Here is my code: IGameState.h class IGameState { public: virtual ~IGameState(); virtual void update() = 0; virtual void render() = 0; };

error LNK2019 unresolved external symbol virtual class

不打扰是莪最后的温柔 提交于 2020-12-05 13:23:39
问题 I know this question was asked several time, but i don't find how to resolve it. I get this error when i'm trying to build my project: error LNK2019: unresolved external symbol "public: virtual __thiscall IGameState::~IGameState(void)" (??1IGameState@@UAE@XZ) in function "public: virtual __thiscall MenuState::~MenuState(void)" (??1MenuState@@UAE@XZ) Here is my code: IGameState.h class IGameState { public: virtual ~IGameState(); virtual void update() = 0; virtual void render() = 0; };

Setting cursor position with Visual Studio Extension

杀马特。学长 韩版系。学妹 提交于 2020-11-30 12:03:05
问题 I'm writing my own Visual Studio 2010 Extension that should help me navigating a rather large solution. I already have a dialog based VS Extension that shows me a class name and a function name depending on some search criteria. I now can click this class/method and I then already can open the correct file and jump to the function. What I now want to do is to set the cursor at the start of that function. My code to jump to the function is: Solution currentSolution = ((EnvDTE.DTE)System

Extract multiple integers from string and store as int

◇◆丶佛笑我妖孽 提交于 2020-11-29 10:36:19
问题 I know that this will extract the number and store as int - string inputData = "sometex10"; string data = System.Text.RegularExpressions.Regex.Match(inputData, @"\d+").Value; int number1 = Convert.ToInt32(data); I am trying to extract multiple numbers from a string eg- 10 + 2 + 3 and store these as separate integers. note : the amount of numbers the user will type in is unknow. Any suggestions much appreciated thanks 回答1: You can use a LINQ one-liner: var numbers = Regex.Matches(inputData, @"