News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Problem running any .exe file a make

Started by owenisred, September 20, 2010, 02:32:50 PM

Previous topic - Next topic

owenisred

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.

xunxun

You can add the pause statement such as "getchar()" in your souce code.
Regards,
xunxun

stahta01

#2
Quote from: owenisred on September 20, 2010, 02:32:50 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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]