我将如何通过记事本++编译文件,是否可以调用编译器(gcc)并将文件传递到gcc?
我在 C:\Program Files\gcc 中有 gcc
我将如何通过记事本++编译文件,是否可以调用编译器(gcc)并将文件传递到gcc?
我在 C:\Program Files\gcc 中有 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.
这对我来说适用于单文件 C 编程: - 安装 NppExec 插件,然后:
"C:\Program Files\CodeBlocks\MinGW\bin\gcc.exe" "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)"\$(NAME_PART).exe