Home >Development Tools >notepad >How to run C language in notepad++

How to run C language in notepad++

(*-*)浩
(*-*)浩Original
2019-08-12 13:48:2717983browse

How to run C language in notepad++

首先需要在电脑上搭建MinGW编译环境。(推荐学习:notepad++

下载后安装,安装完成后需要在Path中添加bin环境变量,具体安装步骤不多说,这里要注意MinGW一定要安装在C盘,以免之后不必要的错误。

编译环境搭建完成以后,打开NotePad++,创建一个.c文件并写一段C语言代码

How to run C language in notepad++

写完之后,点击菜单栏--》运行--》运行,弹出框中输入编译命令:

cmd /k gcc -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" "$(FULL_CURRENT_PATH)" & pause & exit<br>

选择快捷键后保存为: gcc编译,注意快捷键不要有重复,在点击弹出框的运行,Ok。

How to run C language in notepad++

下一步,再点击菜单栏--》运行--》运行,弹出框中输入:

cmd /k "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"<br>

同理保存名称换为为: gcc运行,再点运行程序就会执行了。  

How to run C language in notepad++

搭建完成!可以运行c语言了

The above is the detailed content of How to run C language in notepad++. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn