Running gcc from notepad ++?

How can I compile a file via notepad ++, can I call the compiler (gcc) and transfer the file to gcc?

I have gcc in C: \ Program Files \ gcc

+4
source share
2 answers

You can run external tools from Notepad ++. You can use something in the lines of the following command to compile 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" 

cmd /K stores the command prompt window after running the command; otherwise, it will exit immediately after the gcc process completes, which will not help if build errors occur.

+7
source

This works for me to program with a single C file: - Install the NppExec plugin, then:

 "C:\Program Files\CodeBlocks\MinGW\bin\gcc.exe" "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)"\$(NAME_PART).exe 
0
source

All Articles