Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The method of configuring c environment variable by notepad

Shulou Source: shulou.com Published: 2022-06-02 16:26:45 09月28日 Update

This article mainly introduces the method of notepad configuration c environment variables, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

How does notepad configure the c environment variable?

Download and install Notepad++, this step will not be repeated.

Install minGW (or copy the minGW folder, it doesn't matter whether you install it or not, it doesn't affect the use) to disk C (other disks are also available, here take disk C as an example).

When you are finished, change the name of the minGW folder of disk C to MinGW64.

Add "C:\ MinGW64\ bin" to the system environment variable (C:\ MinGW64 is the copy or minGW installed just now, with a bunch of stuff in it, never mind).

Check whether the compiler can be found by the system.

"win key + R", enter "cmd", enter to confirm, call up the dos command window, enter: Gmail +-v, notice that there is a space between Gmail + and-v, enter, you should see the message shown in the figure, indicating that mingw is ready to work ok. The red part indicates the version of mingw used, and I am using mingw 5.3.0.

If you show that glisten + is not an internal command, or a similar prompt, you can reboot and try again (it should not be a problem after correctly adding environment variables).

Here are the main points:

Open notepad++, and press F5, or click "run-> run" on the menu bar, pop up the following dialog box, enter:

Cmd / k cd / d "$(CURRENT_DIRECTORY)" & Gmail + "$(FILE_NAME)"-o "$(NAME_PART)" & "$(NAME_PART) .exe"

Then click Save.

Click "Save", the following pop-up dialog box, set the name of the command and keyboard shortcuts, for example: name input "Cbig keys + compiler", shortcut (shortcut keys) can be set to their own habits. Click "OK" and you are done.

Try out the following C code: (save as "new 1.c")

# include int main (void) {printf ("Hello C World!\ n"); return 0;}

Click on the notepad++ menu bar "run-> Cumberbatch + compiler" to run perfectly!

Try out the following C++ code: (save as "new 2.cpp")

# include using namespace std;int main () {cout

Tags: Run variables environment articles input configuration commands menus methods code dialogs shortcuts files folders systems Cards dialogs dialogs done it doesn't matter it doesn't matter Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Microsoft Docker Shulou Tech Info MariaDB