4

我将如何通过记事本++编译文件,是否可以调用编译器(gcc)并将文件传递到gcc?

我在 C:\Program Files\gcc 中有 gcc

4

2 回答 2

7

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.

于 2009-12-01T05:31:06.563 回答
0

这对我来说适用于单文件 C 编程: - 安装 NppExec 插件,然后:

"C:\Program Files\CodeBlocks\MinGW\bin\gcc.exe" "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)"\$(NAME_PART).exe
于 2013-04-06T02:44:07.410 回答