visual-studio-2013

C# Console Application - cmd.exe hangs

狂风中的少年 提交于 2021-02-19 03:33:09
问题 I am having issues with running a simple C# Console Application in Visual Studio 2013. Details of my problem: I was running Console Applications successfully with the default "Press any key to continue" displaying cleanly at the end. Suddenly it started behaving differently with the following symptoms: A new command window (cmd.exe) opening alongside my Console Application (this wasn't happening in the past) My Console Application closing abruptly without the default clean "Press any key"

Visual Studio 2013 missing CLR Widows Form application template

帅比萌擦擦* 提交于 2021-02-18 17:46:25
问题 I was very surprise when I Tried to create Visual C++ Windows Form Application (CLR) in Visual Studio 2013 RC ultimate. I could not found any template for Windows form under CLR section. It was in Visual Studio 2010. I tried by using "CLR Empty Project" but by adding any windows form it got error. Error 1 error LNK1561: entry point must be defined Any solution for this? 回答1: This was a breaking change from VS2012. As it says on the above MSDN page, under Breaking Changes in Visual C++ :

Variadic template resolution in VS2013 - Error C3520

孤街浪徒 提交于 2021-02-17 00:07:24
问题 What's wrong with this code? enum LogLevel { LogLevel_Error = 1, LogLevel_Warning = 2, LogLevel_Info = 3, LogLevel_Debug = 4 }; LogLevel GetLogLevel() {return LogLevel_Debug;}; void Write(const std::string& message) {}; void Write(LogLevel level, std::stringstream& ss) { if (level > GetLogLevel()) return; Write(ss.str()); } template<typename Arg> void Write(LogLevel level, std::stringstream& ss, Arg arg) { if (level > GetLogLevel()) return; ss << arg; Write(ss.str()); } template<typename

Variadic template resolution in VS2013 - Error C3520

淺唱寂寞╮ 提交于 2021-02-17 00:06:30
问题 What's wrong with this code? enum LogLevel { LogLevel_Error = 1, LogLevel_Warning = 2, LogLevel_Info = 3, LogLevel_Debug = 4 }; LogLevel GetLogLevel() {return LogLevel_Debug;}; void Write(const std::string& message) {}; void Write(LogLevel level, std::stringstream& ss) { if (level > GetLogLevel()) return; Write(ss.str()); } template<typename Arg> void Write(LogLevel level, std::stringstream& ss, Arg arg) { if (level > GetLogLevel()) return; ss << arg; Write(ss.str()); } template<typename

Visual Basic Shell Administrator?

丶灬走出姿态 提交于 2021-02-11 12:35:11
问题 If I'm using Visual Basic to run an executable using the Shell() command, how would I run that executable as an administrator? My method works, at least in practice, but one executable won't run properly and I think that's the issue. Here's an example of the command I'm trying to run. Shell("%temp%\ninite.exe") Edit: Sorry, this is VB.net, not VBA. I put a bad tag on there. 回答1: To stay strictly in VBA with no .NET dependencies, you should be able to use the ShellExecute Win32 function.

Visual Basic Shell Administrator?

五迷三道 提交于 2021-02-11 12:35:05
问题 If I'm using Visual Basic to run an executable using the Shell() command, how would I run that executable as an administrator? My method works, at least in practice, but one executable won't run properly and I think that's the issue. Here's an example of the command I'm trying to run. Shell("%temp%\ninite.exe") Edit: Sorry, this is VB.net, not VBA. I put a bad tag on there. 回答1: To stay strictly in VBA with no .NET dependencies, you should be able to use the ShellExecute Win32 function.

How to register a DLL with RegAsm in Build EventS VS2013

天涯浪子 提交于 2021-02-10 08:43:52
问题 In every compile, output dll is changed in my program and after every compile, I must register dll again. I can register it via Visual Studio Command Prompt as regasm mydll.dll. But I dont want to do it everytime and I want it as automatically. After some research, I have detected that it is possible with Visual Studio from Build Events (project>properties). But I have never used Build Events before and I really cannot understand how it will be. Should I write my dll path to pre-build event

No GPU Support using OpenCv 2.4.10 + Cuda 7.5 + W10

不羁的心 提交于 2021-02-10 08:43:14
问题 Im trying to get GPU up and running using: OpenCv 2.4.10 Visual Studio 2013 Cuda toolkit 7.5 (cuda samples tested and running) Windows 10 x64 Lenovo Y50 with NVIDIA GEFORCE GTX 860M I have compiled OpenCv using CMake with WITH_CUDA=ON, and then installed the libraries by opening OpenCv.sln and built ALLBUILD and INSTALL projects. Set my Project configuration as: VC++ Directories include Directories: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include C:\OpenCv\opencv\build\install

How to register a DLL with RegAsm in Build EventS VS2013

五迷三道 提交于 2021-02-10 08:43:11
问题 In every compile, output dll is changed in my program and after every compile, I must register dll again. I can register it via Visual Studio Command Prompt as regasm mydll.dll. But I dont want to do it everytime and I want it as automatically. After some research, I have detected that it is possible with Visual Studio from Build Events (project>properties). But I have never used Build Events before and I really cannot understand how it will be. Should I write my dll path to pre-build event

Error 1 error LNK1104 after change Preprocess to a File

佐手、 提交于 2021-02-10 07:45:37
问题 I had to use a preprocessor, so I changed: Configuration Properties -> C++ -> Preprocessor -> Preprocess to a File -> Yes And got the error: Error 1 error LNK1104: cannot open file 'Debug\asnreal.obj' The solution to this problem: I had to add quotes around the path to my .lib file in Project->Properties->Configuration Properties->Linker->Input->Additional Dependencies . I do not understand what kind of file .lib? Where is it? In my project, it is not. What do I need to specify in Additional