visual-studio-2010

Solving error MSB8011: Failed to register output

元气小坏坏 提交于 2020-01-31 03:39:10
问题 A strange error: error MSB8011: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions. C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets 744 I got this error when trying to use OpenSceneGraph (OSG) in an ActiveX control. A Google search showed all kinds of solutions which didn't really solve the problem or locate the exact cause of the error, so I'd like to put the solution in one

Visual Studio SDK - Handle File Save Event

柔情痞子 提交于 2020-01-31 03:10:26
问题 I would like to run a script after files with certain extensions are saved in visual studio. I am wondering where the event handler for saving a file is located in the Visual Studio SDK API. Can anyone point me in the right direction in terms of API documentation for visual studio extensions. I have found the Visual Studio SDK Reference but some direction or sample examples would be helpful. I want to create partial designer files that are usually generated when the project is built (Mono for

Share a variable between two classes

半城伤御伤魂 提交于 2020-01-30 13:27:43
问题 I have two different .cs windows in just 1 project. Each one runs a different part of my program. But now I need to use a variable (i) of mainwindow.cs in Form.cs. This variable changes all the time. How can I do it? MAINWINDOW.CS namespace samples { using System.IO; ........ public partial class MainWindow : Window { float i; } } FORM1.CS namespace samples { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { ...

C++ template friend function not linking

元气小坏坏 提交于 2020-01-30 08:08:01
问题 I have the following code which compiles in VC6 : Text.h: template <typename T> class CTextT { public: friend CTextT add(const CTextT& text1, const CTextT& text2) ; friend CTextT operator+(const CTextT& string1, const CTextT& string2) { return ::add(string1, string2);} } .................... }; And at the end of the header #include "Text.inl" Text.inl: template <typename T> CTextT<T> add(const CTextT<T>& text1, const CTextT<T>& text2) { CTextT<T> temp ; // do something return temp ; } But

Problems with exporting DLL in VS2010 (CUDA)

為{幸葍}努か 提交于 2020-01-30 08:07:44
问题 I have having trouble when building the DLL solution. I am making the DLL for use in LabVIEW 2010 in order to have CUDA capabilities. However, I am getting linker error LNK2019 on every single one of my functions I want exported. #include "LVCUDA.h" #include "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include\cufft.h" #include "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include\cuda.h" #include <windows.h> #include <string.h> #include <ctype.h> BOOL WINAPI DllMain (

C++ template friend function not linking

一曲冷凌霜 提交于 2020-01-30 08:07:24
问题 I have the following code which compiles in VC6 : Text.h: template <typename T> class CTextT { public: friend CTextT add(const CTextT& text1, const CTextT& text2) ; friend CTextT operator+(const CTextT& string1, const CTextT& string2) { return ::add(string1, string2);} } .................... }; And at the end of the header #include "Text.inl" Text.inl: template <typename T> CTextT<T> add(const CTextT<T>& text1, const CTextT<T>& text2) { CTextT<T> temp ; // do something return temp ; } But

How to change the color of Visual Studio syntax highlighting?

六月ゝ 毕业季﹏ 提交于 2020-01-30 05:41:31
问题 VS default color scheme is really tired of watching like: 回答1: All Visual Studio versions have this available here: Menu > Tools > Options > Environment > Fonts and Colors Recent versions of Visual Studio come with 4 built-in themes that can be changed from: Menu > Tools > Options > Environment > General 来源: https://stackoverflow.com/questions/45854094/how-to-change-the-color-of-visual-studio-syntax-highlighting

Why is std::bitset<8> 4 bytes big?

醉酒当歌 提交于 2020-01-30 05:05:36
问题 It seems for std::bitset<1 to 32>, the size is set to 4 bytes. For sizes 33 to 64, it jumps straight up to 8 bytes. There can't be any overhead because std::bitset<32> is an even 4 bytes. I can see aligning to byte length when dealing with bits, but why would a bitset need to align to word length, especially for a container most likely to be used in situations with a tight memory budget? This is under VS2010. 回答1: I assume that indexing into the bitset is done by grabbing a 32-bit value and

What should I do to obtain javascript intellisense for my own js library in Visual Studio

放肆的年华 提交于 2020-01-29 21:05:56
问题 I have multiple javascript files and they have their own functions. If I make reference one of them to inside any of them, it doesnt see its functions if the function is not prototype. What is logic inside the Intellisense ? I want to use Splash function with Intellisense feature below, how can I do that ? //My.js /// <reference path="Test.js" /> . //Test.js NameSpace.prototype.UI = new function () { this.Splash = function (value) { try { if (value == 1) { $('#splash').css('height', $

What should I do to obtain javascript intellisense for my own js library in Visual Studio

和自甴很熟 提交于 2020-01-29 21:03:53
问题 I have multiple javascript files and they have their own functions. If I make reference one of them to inside any of them, it doesnt see its functions if the function is not prototype. What is logic inside the Intellisense ? I want to use Splash function with Intellisense feature below, how can I do that ? //My.js /// <reference path="Test.js" /> . //Test.js NameSpace.prototype.UI = new function () { this.Splash = function (value) { try { if (value == 1) { $('#splash').css('height', $