Computer won't run my programs

I have a bunch of programs that I created on my old computer. They all worked perfectly on it so when I got a new one, I moved all of them over to it; however, they don't work anymore. All the programs that I wrote that are console apps seem to be working normally, but the programs I created using OpenGl or SDL don't work. All that happens is that command prompt opens up, then it either exits or the window for the program opens up (but is blank) and then the program exits. Does anyone have any solutions to this problem?

Another thing that I forgot to mention was that the problem only arises when I run the program by clicking on the program. If I compile it from my IDE and run it that way, it works perfectly. The problem also affects new programs that I write. I made a new program using SDL on my new computer but it still has the same problem even though, like the others, it works perfectly when ran from my IDE.

My old computer ran windows XP and my new one runs windows 8. Also, I've tried running the programs in compatibility mode for windows XP, in reduced color mode, as an admin, and combinations of the 3.
Last edited on
It sounds like a path problem. Relative paths starts from the current working directory. If you start the program by double clicking the current working directory will be the same directory as the executable file is located. IDEs often set the working directory to something else.
I'm not exactly sure what you're saying. What would you recommended to fix it?
Also, it seems that some of my console apps don't work as well (even when ran from my IDE). The ones that don't work are the ones that I used writeconsoleoutputcharacter and fillconsoleoutputattribute on. The programs just display the first character that is to written (uncolored) then the "[Program Name] has stopped working" box pops up and the program closes.
What would you recommended to fix it?

You'll need to go in and change the include locations and linker locations. This is a good lesson on designing software for distribution.
I know its been a while since someone has posted here and this is kind of a noobish question but I've been too busy to get on so:
"How exactly would I do that?" If it's important, I use code::blocks. be as specific as possible when explaining it cause I'm on christmas break and I get slow over breaks
Topic archived. No new replies allowed.