Notepad++配置C(C++)编译环境
下载Mingw编译器
Mingw是Minimalist GNU for Windows的缩写。实际上是将gcc(c/c++编译器)移植到了 Windows 平台下,并且包含了 Win32API ,因此可以将源代码编译为可在 Windows 中运行的可执行程序。而且还可以使用一些 Windows 不具备的,Linux平台下的开发工具。
为编译器配置环境变量
打开系统环境变量,在Path下新增编译器bin文件路径,如下图所示:
测试环境变量
打开cmd命令程序,输入gcc -v,如果不报错,表明环境变量设置成功,如下图:
安装插件nppexec
打开notepad++,找到目录:插件,看是否已安装插件nppexec
如果未安装插件,则需下载,下载网址为:https://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec%20Plugin%20v0.8.3/
如何选在是带PA还是不带PA后缀的,官方文件里是这么描述的:
- The only difference between the dll.zip and dll_PA.zip is the plugin folder structure. The dll.zip corresponds to the plugin folder structure prior to Notepad++ 7.6.x, whereas the dll_PA.zip follows the new plugin folder structure introduced in Notepad++ 7.6.x together with the Plugins Admin.
从字面看notepad++ 7.6.x以前的版本(不包括)选择不带PA后缀的,notepad++ 7.6.x以后的版本选择带PA后缀的。
本人的notepad++是8.1.4版本,所以选择的是带后缀的。
下载完成之后之间将压缩包里的文件NppExec直接提取到对应的notepad++安装的子目录下plugin,如下图所示:
重启notepad++,目录的插件中会多出插件nppexec。