问题标签 [visual-c++-2013]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
521 浏览

masm - Returning a __m128d from MASM procedure to a C caller

I am porting a function from inline assembly to MASM in Visual Studio 2013 and am having trouble getting a return value out of it.

Here is the C caller and the assembly function prototype:

And the assembly function:

As I understand the convention for MASM, return values are normally returned out through the EAX register. However, since I'm trying to return a 128-bit value I'm assuming an out parameter is the way to go. As you can see in the assembly listing, assigning the out parameter (movaps [result]) is causing an access violation (Access violation reading location 0x00000000). I've validated the address of result in the debugger and it looks fine.

What am I doing wrong?

0 投票
1 回答
533 浏览

c++ - 在括号内,模板函数内使用 lambda 时左括号不正确匹配

使用 Visual C++ 2013,以下代码会产生一个奇怪的编译错误:

错误:


当 lambda 函数体没有任何语句时,不会发生此错误:


或者当函数不是模板时:


我想我在这个编译器中发现了一个错误。但是,如果有人知道一种没有错误且不使用变量来保存 lambda 函数的方法,那就太好了。

0 投票
2 回答
322 浏览

c++ - Why does "ctor() = default" change behavior when other constructors are present?

Why does

return 0xCCCCCCCC, whereas

and

both return 0?

0 投票
1 回答
187 浏览

mfc - 在构造函数中声明具有 CWnd 类型成员和 CString 参数的类会导致 C2248

假设我们有一个类声明如下:

现在创建一个对象A

编译器报告:

该代码有什么问题?

这个问题有一个解决方法:将构造函数的签名更改为A(const CString&)可以解决问题。但我想知道为什么会报告该错误。

0 投票
1 回答
8146 浏览

cmake - 使用 MSVC++ 2013 编译时出现“CXX 编译器没有已知功能”

我有一个相对简单CMakeLists.txt的包含以下行:

当我cmake在安装了 MSVC++ 2013 Express 的 Windows 2012 服务器上运行时,我收到以下错误:

是什么导致了这个错误,我能做些什么呢?当我使用 GCC 在 Ubuntu 14.10 中构建项目时,CMake 似乎没有任何问题。

我正在使用 CMake 3.1.0,以防万一(这是第一个支持的 CMake 版本target_compile_features)。

0 投票
1 回答
585 浏览

msbuild - 可以在 MSBuild 命令行上指定平台工具集吗?

我有一个 C++ 静态库项目,想用 VC++ 2010 和 VC++ 2013 构建它。现在我首先将平台工具集设置为 v120 并构建,然后将其更改为 v100 并再次构建。这个过程是否有任何自动化,特别是通过在 MSBuild 命令行上指定工具集?

0 投票
1 回答
67 浏览

visual-studio-2013 - Visual Studio:不能在不同的选项卡中打开多个源文件

在 Microsoft Visual Studio 2013/Visual C++ 2013 中,我不能有多个选项卡显示多个文件。我该如何启用它?

0 投票
1 回答
13126 浏览

c++ - 无法打开包含文件'afxwin.h':在 vs 2013 c++ 中没有这样的头文件或目录

所以,我正在尝试将一些旧代码移植到较新版本的 vs 所以我将项目的 sln 导入到我的 vs 2013 中,我得到了这个错误和其他一些错误,我已经解决了这个论坛上的一些其他问题。所以我知道这与 MFC(微软基础课程)有关,但他们都在谈论不包含 MFC 模块的 vs 2010 express edition。我目前正在使用 vs 2013 community edition,它应该具有完整的功能访问权限vs.我仍然收到此错误,所以请帮忙!

谢谢!

0 投票
2 回答
150 浏览

c++ - Unable to launch program from the IDE

I have learned the basics of C++ but I have never used visual studio.

I would like to know why I get popup window that says "Unable to start program" and then lists a file path C:\folder\folder\folder\../../lib/Win32DB/ProjectNameDB.lib. (The message doesn't give me any more info, like 'the system cannot find the file specified' or anything like that.)

ProjectNameDB.lib exists, but not at that particular location. The project builds successfully, and the same path as above appears in the output after TargetPath =.

I have tried setting the project as startup, deleting .suo files and vcproj.user files, starting without debugging, and putting the location of ProjectName.lib in the Output, Library, Include, Reference Directories.

0 投票
1 回答
745 浏览

winforms - VS 2013 winform 应用程序:如何将泛型对象转换为按钮类型

我正在使用 winform 应用程序在 Visual Studio 2013 上设计 Windows 计算器。我想为模拟计算器键盘的 WinForms 应用程序上的数字按钮编写一个按钮处理程序。但为了做到这一点,我必须首先将对象^发送者转换为按钮类型有。

已经尝试过这样做:

按钮通用 = 按钮发送者;

但它给出了以下错误:

这是myform.h我需要编码的部分: