How do I get SciTE to properly run a C program?

Zelmo3

Senior member
Dec 24, 2003
772
0
0
I started looking at C programming tutorials on the web and was doing the sample programs by opening a terminal over the web browser, typing the code in a standard text editor (nano in my case), compiling it with gcc, and running it from the command line. It all worked nicely in one little terminal window.

A day or two ago I decided I'd like color formatting, syntax highlighting, and automatic indentation so I could better understand what was going on in the code (the indentation feature, of course, is just a time saver). I looked at a lot of IDEs and editors and found that SciTE fits my needs perfectly--it does all of the above for over two dozen languages, compiles and executes code, and has a very small footprint on the desktop, allowing me to read the tutorial on the web browser behind it.

The problem arises when I tell it to run a C program I've coded. It compiles fine and an output pane opens up in the editor (as it should), but I can see in the output pane that it apears to be trying to run the newly coded program simply by calling its name (e.g., for testing purposes I wrote a very short "Hello World!" program named hello.c, which it compiles as hello and tries to run by calling hello). Naturally the shell comes back saying "hello: command not found."

Does anyone know a way to get SciTE to run C code by prefixing it with "sh" or "./"?
 

Zelmo3

Senior member
Dec 24, 2003
772
0
0
Got it. I had to edit a file in SciTE's install directory that defines how C-style code is handled by the program.