Code::Blocks Forums

User forums => Help => Topic started by: owenisred on September 20, 2010, 02:32:50 pm

Title: Problem running any .exe file a make
Post by: owenisred on September 20, 2010, 02:32:50 pm
Hi everyone, I'm new here and I'm also pretty new to Code::Blocks.

I'm running into a few problems at the moment. I'm using the SDL library in my project, and I debugged and built it. My program runs instantly and works perfectly when I do it this way.

However, when I go to the debug folder, and run the .exe, the application appears for a second, and then closes as soon as I open it.

Any ideas?

Thanks,
Owen.
Title: Re: Problem running any .exe file a make
Post by: xunxun on September 20, 2010, 03:34:09 pm
You can add the pause statement such as "getchar()" in your souce code.
Title: Re: Problem running any .exe file a make
Post by: stahta01 on September 22, 2010, 07:45:57 pm

However, when I go to the debug folder, and run the .exe, the application appears for a second, and then closes as soon as I open it.

Any ideas?

Thanks,
Owen.

execute the file from the CMD Prompt. Double Clicking does NOT give as much info sometimes.

You are likely missing DDLs needed to run your exe.
Use Dependency Walker to check what DLLs are needed.
http://www.dependencywalker.com/

Edit: Code::Blocks automatically adds the Compiler bin folder to the system path and the path of some/all library(s) used in the CB project.

Note: The prior post could also be the answer.

Tim S.