Page 1 of 1
Terminal closing immediately
Posted: Fri Aug 02, 2019 4:09 am
by daMik3
Hi!
I just got CodeLite latest version on my Windows laptop and when I build and run the default hello world program, the termainl closes immediately. The box "Pause when execution ends" under Project setting -> General, is checked, but the problem still exists. What can I do?
Thank you!
Re: Terminal closing immediately
Posted: Sat Aug 03, 2019 10:16 pm
by eranif
do you have anything in the output pane?
Re: Terminal closing immediately
Posted: Sun Aug 04, 2019 3:08 pm
by daMik3
It says
Working directory is set to: C:\Users\Mike\Documents\CodeLite_Workspaces\tet\pipis\Debug
Executing: cmd /C call C:\Users\Mike\Documents\CodeLite_Workspaces\tet\pipis\Debug\pipis.exe && pause
Program exited
Code is
Code: Select all
#include <stdio.h>
int main(int argc, char **argv)
{
printf("hello world\n");
return 0;
}
Re: Terminal closing immediately
Posted: Sun Aug 04, 2019 3:41 pm
by eranif
What happens when you run this command from the command line?
Code: Select all
cmd /C call C:\Users\Mike\Documents\CodeLite_Workspaces\tet\pipis\Debug\pipis.exe && pause
Make sure that you execute it from:
Code: Select all
C:\Users\Mike\Documents\CodeLite_Workspaces\tet\pipis\Debug
Re: Terminal closing immediately
Posted: Sun Aug 04, 2019 4:21 pm
by daMik3
It gives me a System Error window that says:
"The code execution cannot proceed because libgcc_s_dw2-1.dll was not found. Reinstalling the program may fix this problem."
Re: Terminal closing immediately
Posted: Sun Aug 04, 2019 4:40 pm
by eranif
This means that you need to the MinGW DLL (libgcc_s_dw2-1.dll ) to be copied into the PATH or better yet, copy it next to your executable
FYI: this has nothing to do with CodeLite, its just how MinGW works on Windows...
Re: Terminal closing immediately
Posted: Sun Aug 04, 2019 4:50 pm
by daMik3
It worked thank you! Will copying the dll file next to the executable get me into any problems when I execute my program on another computer?
Also, when I installed CodeLite it scanned for available compilers on my computer, it said it found none and then it redirected my to a sourceforge link to download MinGW. I downloaded and installed it but then it could still not find it on my pc when it scanned for available compilers. So i had to go to the MinGW page to get it.
Re: Terminal closing immediately
Posted: Sun Aug 04, 2019 4:56 pm
by eranif
Yes, you will need to copy this DLL when you install your program on other computers.
If CodeLite fails to locate your compiler, you should add it manually from:
Settings->Build Settings->Compilers and click on the green plus button
Re: Terminal closing immediately
Posted: Sun Aug 04, 2019 6:15 pm
by daMik3
Appreciate it, thank you!!!
Re: Terminal closing immediately
Posted: Thu Aug 15, 2019 12:18 am
by ThangPham
I have a similar issue on my Codelite 13.0.0. My error message when I try to open it from File Explorer is "... libstdc++-6.dll is missing...". I copied it into the project folder but it doesn't help.
By the way, can you please instruct me on how to manage my templates. I saved the wrong template and also save the correct one into the "Console" instead of "Template".
Since I'm not good with computer or programming, your detailed instruction will be highly appreciated. But thank you all the same for your help.