我有一个全新的 Windows 8.1 Pro x64安装与新的 Visual Studio 2013专业版.当我尝试使用Platform Toolset将项目编译到Windows7.1SDK时,我得到了
Error 1 error MSB6006: "CL.exe" exited with code -1073741515. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.targets 57 5 MenuBrowser
Run Code Online (Sandbox Code Playgroud)
我尝试运行提供的"Windows SDK配置工具",除了得到关于Visual Studio 2005和2008未安装的错误之外,我认为它确实起了作用.
我尝试手动编辑注册表:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows
Run Code Online (Sandbox Code Playgroud)
在这里我手动把CurrentInstallFolder作为C:\Program Files\Microsoft SDKs\Windows\v7.1\和CurrentVersion作为7.1.7600.0.30514.如果我查看项目属性并单击其中的不同路径/变量 - >更多 - >宏,我可以看到$(WindowsSdkDir)是正确的.
知道我应该尝试什么吗?从未在使用Windows 7和VS 2012的旧开发计算机上遇到此问题.
LE作为注释,如果我使用v120工具尝试新项目,它可以工作,但我需要Windows7.1SDK工具.
我刚刚将Visual Studio 2012与Visual Studio 2010一起安装.问题是我无法将简单项目从2010转换到2012年 - 它们无法链接到kernel32.lib等文件或包含windows.h等文件.我的系统还安装了Windows SDK 7.1.
我已经尝试过为我的x86和x64用户平台弄乱Property Manager(因为我在那里添加了适当的$(DXSDK_DIR)引用),只是为了得到混合的结果 - 有时它只是有效,有时它编译但不链接,其他时候它只是停在windows.h
例如,目前我正在接受
1>LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
Run Code Online (Sandbox Code Playgroud)
要么
1>Source.cpp(2): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Run Code Online (Sandbox Code Playgroud)
(取决于是否包含"windows.h"),仅在x64中使用简单的"hello world"类型程序.
在Active(Debug) / Active(x64) -> VC++ Directories -> Include Directories我现在可以看到的项目属性中$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);$(DXSDK_DIR)Include.如果我展开该输入框并单击编辑,我会看到:
$(VCInstallDir) = C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\
$(WindowsSDK_IncludePath) = c:\Program Files (x86)\Windows Kits\8.0\Include\um;c:\Program Files (x86)\Windows Kits\8.0\Include\shared;c:\Program Files (x86)\Windows Kits\8.0\Include\WinRT
Run Code Online (Sandbox Code Playgroud)
虽然我的平台工具集v110 windows.h驻留在c:\Program Files (x86)\Windows Kits\8.0\Include\um\Windows.h(所以应该没有问题).如果我选择Windows …
我正在尝试进行一场爆炸式战争,从 IDEA Ultimate 通过local Tomcat Server run configuration. 当我启动主要工件时,我总是收到此错误。
例如,我查看了此处的其他线程,我认为我遇到了不同的问题。IDEA 报告失败后,Tomcat 启动并运行,我可以毫无问题地连接到localhost:1099Java VisualVM。
关于这一点,我正在运行 Debian 6 x64 系统,本地主机指的是 127.0.0.1 没有问题。Java VisualVM 也可以工作,所以我相信我没有遇到这个问题。我使用的 tomcat 发行版是apache-tomcat-6.0.43.
我在JetBrains trac上读到了一个不同的问题,至少-Djava.rmi.server.hostname=127.0.0.1那里指定的VM 选项没有帮助。
根据此线程(但我显然没有运行 OS X),JDK 和 JMX 接口可能存在问题,介于 1.7.0_40 和 1.7.0_60 之间。我有 1.7.0_53、1.7.0_23 和 1.7.0_80 的问题。在我的情况下,JMX 可能工作正常(正如我上面所说,VisualVM 连接到由 IDEA 启动并“忘记”的 tomcat,localhost:1099没有失败)。
有关修复此错误的任何线索?
每当我在 Visual Studio 中“同步”(拉、推)我的存储库时,我都会注意到git-askpass.exe弹出窗口并询问我的 git 存储库的 ssh 私钥密码。没关系,但我想知道是否有办法让它与ssh-agent.exe.
当开始我的git bash的解释,我也总是开始了自己的ssh-agent.exe(它在Program Files/git相对于Visual Studio的Program Files (x86)/Microsoft Visual Studio/2017/Professional/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Git/mingw32/libexec/git-core)和ssh-add.exe我的私人密钥,以便它要求我一次密码,然后停止困扰着我。在 Visual Studio 中,我总是必须在“同步”项目时重新输入我的私钥的密码。有什么办法可以滑流吗?
我正在考虑删除整个 Visual Studio 文件夹并创建一个指向 Git for Windows 文件夹的硬链接......
还有使用 Visual Studio 2017 使用 SSH 连接到 Git 存储库,这似乎并没有涵盖我的情况。
我有这个代码:
class Program
{
static void Main(string[] args)
{
var a = new Dictionary<string, int>()
{
{ "12", 12 },
{ "13", 13 },
};
}
static object Fifteen()
{
//return new object[] { "15", 15 };
return new {key = "15", value = 15};
}
}
Run Code Online (Sandbox Code Playgroud)
如何编写Fifteen以便将其添加到初始化程序中?
我想要这个,编译:
var a = new Dictionary<string, int>()
{
{ "12", 12 },
{ "13", 13 },
Fifteen()
};
Run Code Online (Sandbox Code Playgroud)
LE编译错误是: error CS7036: There is no argument given that corresponds to the …
经过相当长的序言,我有两个问题.
通过查看任何函数指针,void*我可以修改它的第一条指令,将它们转换为a jmp(32位相对或64位绝对,via r11,取决于x86/x86-64).我认为在数据中查看函数代码在C和C++中都是非法的,但它在MSVC(Win32)和GCC(OS X)中以某种方式似乎都以不受支持的方式工作.互联网上有几个地方说铸造功能指针void* 是非法的.
一个人不仅仅是获得一个指向类成员的指针.我的意思是,编译器在构建时直接抛出错误,试图以与我看待的方式相同的方式查看这样的指针void *,这对于非成员函数来说似乎工作正常.
幸运的是,以钩的Direct3D9,我用的东西那样工作IDirect3DDevice9具有vtable.对于pDev类型IDirect3DDevice9*,我看到的就足够pDev了PVOID*.然后,第一个值at pDev是函数指针数组的地址(vtable):
// IDirect3DDevice9::Present()
typedef HRESULT (CALLBACK *PRESENT_PROC)(
LPDIRECT3DDEVICE9, const RECT*,
const RECT*,
HWND,
const RGNDATA*
);
PVOID (*vPtr)[] = reinterpret_cast<PVOID (*)[]>(
*reinterpret_cast<PVOID*>(pDev)
);
PRESENT_PROC pDevicePresent = reinterpret_cast<PRESENT_PROC>(
(*vPtr)[17]
);
Run Code Online (Sandbox Code Playgroud)
因为现在是第18次入场.
这里的第一个答案给出了一个更优雅,更高级的方法,从定义开始CINTERFACE.我还没有测试过,但根据它,我可以做类似的事情
reinterpret_cast<PVOID>(pDev->lpVtbl->Present)
Run Code Online (Sandbox Code Playgroud)
没有错误.
第一个问题.我不是一个很棒的C++程序员; 一般来说,如何获得指向成员函数的指针,以便我可以覆盖该函数的可执行字节.对于非会员我做:
#include <windows.h>
#include <cstdio>
using namespace std; …Run Code Online (Sandbox Code Playgroud)