Author Topic: Problem running any .exe file a make  (Read 4735 times)

owenisred

  • Guest
Problem running any .exe file a make
« 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.

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Problem running any .exe file a make
« Reply #1 on: September 20, 2010, 03:34:09 pm »
You can add the pause statement such as "getchar()" in your souce code.
Regards,
xunxun

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7786
    • My Best Post
Re: Problem running any .exe file a make
« Reply #2 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.
« Last Edit: September 22, 2010, 07:53:16 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org