开发者

executing gcc from notepad++?

开发者 https://www.devze.com 2022-12-12 18:55 出处:网络
How would I compile a file through notepad++, is there away i can invoke the compiler (gcc) and pass through 开发者_高级运维the file onto gcc?

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
0

精彩评论

暂无评论...
验证码 换一张
取 消