visual-studio-2012

Conditionally changing target framework version

有些话、适合烂在心里 提交于 2020-01-30 06:02:05
问题 I'm trying to compile an #ifdef'd codebase to two different target frameworks, namely 3.5 and 4.0. I attempted to modify the .proj files in the solution to no avail. It seems MSBuild / VS2012 isn't picking up the solution configuration change via UI. This is a fragment of one of the .proj files: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\Binaries\</OutputPath> <DefineConstants>TRACE

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 the bad_alloc(const char*) was made private in Visual C++ 2012?

瘦欲@ 提交于 2020-01-30 04:33:59
问题 I am just trying to compile a bit bigger project using the Visual Studio 2012 Release Candidate, C++. The project was/is compiled using the VS2010 now. (I am just greedy to get the C++11 things, so I tried. :) Apart of things that I can explain by myself, the project uses the code like this: ostringstream ostr; ostr << "The " __FUNCTION__ "() failed to malloc(" << i << ")."; throw bad_alloc(ostr.str().c_str()); The compiler now complains error C2248: 'std::bad_alloc::bad_alloc' : cannot

OpenMP 4.0 for accelerators: Nvidia GPU target

◇◆丶佛笑我妖孽 提交于 2020-01-25 18:08:26
问题 I'm trying to use openMP for accelerators (openMP 4.0) in Visual Studio 2012, using the Intel C++ 15.0 compiler. My accelerator is an Nvidia GeForce GTX 670. This code does not compile: #include <stdio.h> #include<iostream> #include <omp.h> using namespace std; int main(){ #pragma omp target #pragma omp parallel for for (int i=0; i<1000; i++) cout<<"Hello world, i am number "<< i <<endl; } Of course, everything goes fine when I comment the #pragma omp target line. I get the same problem when

OpenMP 4.0 for accelerators: Nvidia GPU target

自闭症网瘾萝莉.ら 提交于 2020-01-25 18:06:06
问题 I'm trying to use openMP for accelerators (openMP 4.0) in Visual Studio 2012, using the Intel C++ 15.0 compiler. My accelerator is an Nvidia GeForce GTX 670. This code does not compile: #include <stdio.h> #include<iostream> #include <omp.h> using namespace std; int main(){ #pragma omp target #pragma omp parallel for for (int i=0; i<1000; i++) cout<<"Hello world, i am number "<< i <<endl; } Of course, everything goes fine when I comment the #pragma omp target line. I get the same problem when

ClickOnce Setup instantly stops executing

这一生的挚爱 提交于 2020-01-25 10:58:07
问题 I've got a problem with a ClickOnce Setup and have absolutely no idea what I'm doing wrong... I'm trying to publish a VSTO AddIn for Outlook 2013 using VS2012. However when I click on the Setup.exe created by the ClickOnce Publish the Setup shows the small installation window for about half a second and then instantly disappears again. This without showing any error message or generating any event log entries at all. The ClickOnce manifest is signed with a test certificate (self-signed

Boost.Python tries to link against python27.lib using Visual C++

我是研究僧i 提交于 2020-01-25 10:51:07
问题 I'm trying to build boost python using Python 3.2. I'm linking against python32.lib and libboost_python3-vc110-mt-gd-1_52.lib. I also definied BOOST_ALL_NO_LIB to disable boost's auto link feature. Still I'm getting the following error: fatal error LNK1104: cannot open file 'python27.lib' How to tell boost to use Python 3.2? 回答1: Do you have multiple Python installations on your computer? You probably have to create a user-config.jam file with content like this: using python : 3.2 : C:\Path

Fix for Visual Studio 2012 Mouse Pointer

旧时模样 提交于 2020-01-25 08:26:05
问题 I think I mistakenly hit some unknown key sequence in Visual Studio. Now, my mouse is this horrible/useless square box in the GUI instead of the default arrow. Here is a video: https://www.youtube.com/watch?v=Qo1oqg2Wl5k Does anyone know how to change that back? The closest issue I found related to this was szalski's solution. It did not solve my issue, though. It just turned the box black. Is there a way to embed the video instead of leaving a hard link? Update: The Right-Click the controls

Cannot install pylearn2 to WinPython-64bit-3.4.4.1

你离开我真会死。 提交于 2020-01-25 03:01:31
问题 I am trying to install the pylearn2 package (http://deeplearning.net/software/pylearn2/). I do it in the Windows 7(x64) with the WinPython-64bit-3.4.4.1. First there is an error said that :"Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat)". Then I install the VS2012 and configure the environment variables. After I execute "python setup.py develop", there is a new error which is cited as followed: E:\WinPython-64bit-3.4.4.1\download\pylearn2>python setup.py develop WARNING

Stop build and display message with Build Events

会有一股神秘感。 提交于 2020-01-24 12:01:05
问题 I am using the Build Events with Microsoft Visual Studio Express 2012 to copy some files into the $(TargetDir) . How can I stop the build if a particular file isn't found. Currently I have something like: IF EXIST somefile ( ECHO true ) ELSE ( ECHO false ) With displays true and false to the build output dialog as appropriate but I'd like to replace ECHO false with ELSE ( ECHO somefile was not found exit ) Where exit stops the Visual Studio from building the project and somefile was not found