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
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.
This works for me for single file C programming: - Install the NppExec plugin, then:
"C:\Program Files\CodeBlocks\MinGW\bin\gcc.exe" "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)"\$(NAME_PART).exe
精彩评论