Windows 7 Professional, CodeLite 12.0, minGW64, SFML 64
I have a simple "Hello World" program that runs fine without debugging and
with debugging without a breaktrap. If I set a breaktrap the program will
run and stop at the breaktrap for 1-2 seconds and then it exits.
The output message is: Invalid parameter passed to C runtime function
Also there is a 12 second dead time when I start the program after a build.
If I haven't done a build there is no dead time.
Here's the code:
#include <stdio.h>
using namespace std;
Also there is a 12 second dead time when I start the program after a build.
i.e. there's a 12-second delay the first time you run a newly generated exe file. This is an almost completely wild guess, but I've noticed that sort of thing can happen due to overly aggressive antivirus software scanning the file.
If you have antivirus running, I would suggest just turning it for a minute to see if you still get the same issues.
Otherwise, try to clean your project, and also go to Debugger -> Delete all breakpoints, and then replace your breakpoints.
Compiler options are:
C++ Compiler options are -g -O0;-Wall
C Compiler options are -g -O0;-Wall
The user namespace std; is just habit.
Debug Problem
I have done "Clean Workspace, "Rebuild Workspace, Deleted my workspace and
uninstalled and reinstalled CodeLite and started over, same problem.
12 second delay
I suspected the antivirus so I turned it off , did a build and still had the
12 second delay but I did it all again and the delay was gone. I have told
my anitvirus ignore this program.
You mean "bad habit" right? Especially in what appears to be a C program.
I'd also suggest you consider adding a few more warning switches, such as -Wextra, -pedantic, -pedantic-errors. And for C++ -std=c++17, for C -std=c11.