程序在Visual Studio外面运行不同 [英] Program behaves differently running outside Visual Studio

查看:150
本文介绍了程序在Visual Studio外面运行不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个程序,绘制Mandelbrot和Julia集,显示它们与OpenCV(在单独的窗口),它在Visual Studio内正确运行,但是当我在Visual Studio外部运行时一个窗口不能正确缩放。

I have a program that draws Mandelbrot and Julia sets, displaying them with OpenCV(in separate windows), it runs correctly inside Visual Studio, but when I run the .exe outside visual studio one of the windows doesn't zoom properly.

显示Mandelbrot集合的窗口正确绘制和缩放,另一个窗口使用完全相同的缩放方法(在Visual Studio中运行时工作)不起作用

The window displaying the Mandelbrot set draws and zooms correctly, the other window, using the exact same zoom method (that works when running inside Visual Studio) doesn't work

case CV_EVENT_LBUTTONDOWN:
    zx_point += x*zinc;
    zy_point -= y*zinc;
    zinc *= zoom_safe;
    zx_point -= x*zinc;
    zy_point += y*zinc;
    Draw(ptr_kernel, ptr_queue, ptr_image, ptr_context);
break;

看起来像 zx_point zy_point 没有被写入,因为窗口放大到左上角,无论我点击什么。

It seems like "zx_point" and "zy_point" aren't being written to, since the window zooms into the top left corner no matter where I click.

简而言之,在visual studio中调试/释放工作,外面有同样奇怪的行为。 dll与.exe在同一文件夹中输出窗口显示在VS2010加载相同的dll。

In short, debug/release work inside visual studio, have the same strange behavior outside. The dlls are in the same folder as the .exe the output window shows those same dlls loading in VS2010

这可能导致这种奇怪的行为?

What might cause such strange behavior?

感谢

推荐答案

在Visual Studio中运行程序和外部Visual Studio之间的区别是: / p>

The differences between running a program within Visual Studio and outside visual studio are:


  1. 传递给程序的参数。

  1. The arguments that are passed to the program.

应用程序的工作目录。

环境变量,如果你在启动Visual Studio之后更改它们(或者在启动启动器:eg:Explorer ++)

The environment variables if you changed them after you started Visual Studio (or after you started the launcher if you use such launcher: e.g.: Explorer++)

这篇关于程序在Visual Studio外面运行不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆