executing gcc from notepad++?

c, compilation, gcc, notepad++

Solution

You can run external tools from Notepad++. You can use something along the lines of the following command for compiling a single source file as an executable using gcc:

cmd /K "c:\path\to\gcc.exe" "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"

The `cmd /K` keeps the command window around after it executes the command; otherwise it will exit immediately after the `gcc` process completes its task, which isn't helpful if you have build errors.

Problem

How would I compile a file through notepad++, is there away i can invoke the compiler (gcc) and pass through the file onto gcc? i have gcc in C:\Program Files\gcc

Original source