Recently, I have been using ultraedit, a powerful text editing tool, to write code, and then use the command line to compile the CPP file. However, it is very troublesome to compile this script every time and set the environment variable so that cl.exe can be used normally. Looking at the help files of ultraeditthis Day, I suddenly found that cl.exe compilation can be directly used in ultraedit !!!!!
Create a custom tool to compile the program.
Open ultraedit, advanced-tool configuration,
The content was blank when it was just opened. This is my configured interface.
The menu item name is the name of the tool you want to create, and the command line is the command you want to execute after clicking this button. Here, enter:
Vcvarsall. BAT & CD % P & cl.exe/ESCs/MDD % N % E
If you are not familiar with other commands, you can find relevant information. Here, we will only talk about the special points in ultraedit.
% P is a variable in ultraedit, whose content is the path of the directory where the current file is located; % N is the file name of the current active file (excluding the extension), and % E is the extension of the current file. % N % E is used to spell out the file name.
Working directory:
D: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ Vc, that is, the directory where vcvarsall. bat is located. This bat is used to set environment variables.
The toolbar icon is optional and is displayed on the toolbar. If the ICO file is not specified, the default icon is used.
Settings for the following two tabs:
In this way, the compile button is set! Click OK and you will find a button added to the toolbar:
Let's write a few lines of the simplest code!
After clicking the button we just created, the following output window will automatically capture the output information:
In the .cpp;directory, The main.exe main. OBJ and main.exe. manifest files are generated.
The following is a run tool used to execute compiled programs.
:
After execution, the program running result is output to the following output window:
Ultraedit has more powerful functions to be explored. Don't rely on VC any longer !~