Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Program crashes when outside test environment - C++

I have a program that runs fantastically when run from inside Visual Studio 2010 Express but when built and taken out, it has problems. I have set up the external test environment the same as when it is run from within Visual Studio so that shouldn't be the problem. I want to attach it to the .exe to see where the crash is but I don't have the non-Express versions.

Any suggestions? Why would a program crash outside of the the VSC++ 2010 Express environment but run perfectly inside.

I would post code but it's a huge project, not a line that would cause an error.

Thank you so much for your time.

like image 376
Satchmo Brown Avatar asked Jun 10 '11 01:06

Satchmo Brown


1 Answers

It's very difficult to know for certain without knowing what the crash is, but a couple of common issues that may cause this:

  • Environment variables not the same. Perhaps you are relying on something in vcvars32.bat in your test environment.
  • The PATH environment variable is not the same and your picking up some bad or incompatible DLL.
  • Your code is somehow dependant on the current working directory being the one when run from Visual Studio.
like image 67
zdan Avatar answered Oct 23 '22 03:10

zdan