我正在使用 openframeworks 创建一个项目(完整源代码在这里: https: //github.com/morphogencc/ofxAsio/tree/master/example-udpreceiver),并且空项目似乎编译得很好。
我添加了 ASIO 库和一些标头类,现在该项目似乎出现以下错误:
1>------ Build started: Project: example-udpreceiver, Configuration: Debug x64 ------
1> main.cpp
1>cl : Command line error D8049: cannot execute 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\c1xx.dll': command line is too long to fit in debug record
1>cl : Command line error D8040: error creating or communicating with child process
我在 stackoverflow 甚至 Microsoft 的页面上都找不到任何错误 D8049 的示例,而且 google 也没有找到任何结果。唯一有用的一个是这个 github 问题:
https://github.com/deplinenoise/tundra/issues/270
但我仍然不确定是什么原因导致了这个问题。有谁熟悉此错误,并且可以推荐一种方法来解决导致该错误的原因吗?
提前致谢!
c++ compiler-errors openframeworks visual-studio visual-studio-2015
当您使用propdp代码片段创建依赖项属性时,它不会为您建议创建依赖项属性的类的正确名称,您必须手动键入它,如下例所示:
namespace YourApp.Controls
{
public sealed class YourButton : Control
{
public YourButton()
{
this.DefaultStyleKey = typeof(YourButton);
}
public string Text
{
get { return (string)GetValue(TextProperty); }
set { SetValue(TextProperty, value); }
}
// Using a DependencyProperty as the backing store for Text. This enables animation, styling, binding, etc...
public static readonly DependencyProperty TextProperty =
DependencyProperty.Register("Text", typeof(string), typeof(ownerclass), new PropertyMetadata(0));
}
}
Run Code Online (Sandbox Code Playgroud)
我不想作为默认值Ownerclass,在这种情况下我想要YourButton。
如何修改代码片段以提出正确的名称?
重新发帖原因:
本来我只得到一个回复,只是指出标题夸大了。因此,再试一次,也许这次会有更多的人看到这个问题,因为我真的不知道还能看哪里......我会确保删除原来的问题以避免重复,并保留这个新问题。我并不是想向论坛发送垃圾邮件。
请随意在编辑时删除上面的文本,我只是想解释为什么我要重新发布 - 但这并不是问题的一部分。
所以,最初的问题是:
我的程序中有一些函数在 Visual Studio Community,2015 中的调试模式下运行速度非常慢。它们是用于“索引”3D 模型顶点的函数。
通常情况下,我准备好调试模式会慢一点,可能慢 2 -3 倍。但...
在发布模式下,程序将在大约2 - 3 秒内启动并索引模型。完美的。
然而,在调试模式下,我的程序需要7 分钟以上才能真正响应、开始渲染并接受输入。它在索引一个模型时卡住了七分钟多。在此期间程序完全冻结。
相同的模型在“发布”模式下加载和索引只需不到 3秒。调试过程中怎么可能花费如此长的时间?
调试和发布模式都是标准的开箱即用模式。我不记得更改过其中任何一个的任何设置。
以下是在调试模式下减慢程序速度的代码:
// Main Indexer Function
void indexVBO_TBN(
std::vector<glm::vec3> &in_vertices,
std::vector<glm::vec2> &in_uvs,
std::vector<glm::vec3> &in_normals,
std::vector<glm::vec3> &in_tangents,
std::vector<glm::vec3> &in_bitangents,
std::vector<unsigned short> & out_indices,
std::vector<glm::vec3> &out_vertices,
std::vector<glm::vec2> &out_uvs,
std::vector<glm::vec3> &out_normals,
std::vector<glm::vec3> &out_tangents,
std::vector<glm::vec3> &out_bitangents){
int count = 0;
// For each input vertex
for (unsigned int i = …Run Code Online (Sandbox Code Playgroud) 这个问题并不总是存在,我在 VS 或 ReSharper 中找不到纠正它的选项,但是当我使用鼠标将光标放在较短的代码行上,并将光标放在该行末尾附近时,在空白中,它保留在那里,而不是跳回到该行的最后一个字符。
我刚刚使用 ReSharper 设置了新的 Visual Studio 2015 环境。在我的旧系统上,IDE 代码编辑器窗口中,只要一行太长,就会显示一个小字形,指示该行已换行以适合编辑器。(实际行内容没有改变)。
我希望出现一个小字形,表明字符串已被包裹。
我不记得这是 Visual Studio 还是 ReSharper 设置,也不记得在哪里设置。
如何在 vsvim 中重新绑定转义键(在 Visual Studio 2015 中)?现在,我使用esc或ctrl+[进入命令模式,但我想改用df按键。我怎样才能重新绑定它们?
我发现我需要.vsvimrc在主目录中创建文件并在其中写入一些类似于nmap <df> :vsc MyCommand. 这样对吗?
但我不明白命令到底是什么,而不是“MyCommand”。
我想使用 C# 登录该程序,使用存储在 phpmyadmin 中的 SQL 数据库中的用户名和密码。这是我到目前为止所拥有的。
private void button1_Click(object sender, EventArgs e)
{
MySqlConnection connection;
string server = "localhost";
string database = "login";
string uid = "root";
string password = "";
string connectionString;
connectionString = "SERVER=" + server + ";" + "DATABASE=" +
database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";
connection = new MySqlConnection(connectionString);
try
{
connection.Open();
if (connection.State == ConnectionState.Open)
{
connection.Close();
Form1 frm = new Form1(this);
frm.Show();
Hide();
} …Run Code Online (Sandbox Code Playgroud) Visual Studio中有没有一种方法可以调试只有一行的函数?
就像是:
int foo(int a) { return a + 1; }
Run Code Online (Sandbox Code Playgroud)
看起来当 VS 进入函数时,没有任何数据被正确初始化,并且在检查变量“a”时,我得到了垃圾数据。一旦我进入下一行,数据通常会被初始化,但由于这是一个单行函数,它似乎永远不会这样做,这很烦人(因为我需要重新编译所有内容只是为了检查 a 的值)。
我刚刚在 VS2015 中调试时目睹了一些奇怪的行为。当我调试时,由于某种原因,调试器跳回到某个点,最终导致抛出异常。Ctrl奇怪的是,我只在调试时得到这个异常,如果我只是点击+就不会得到这个异常F5
我的最终形象:private System.Windows.Controls.Image FinalImage{ get; set; }
为什么会出现这种情况?由于某种原因它又跳回来了FinalImage.Source,我不明白为什么。看这个动图:
异常表明我无法将位图转换为 uri...感谢您的帮助!