EditPlus Configuration VC + + and related matters needing attention

Source: Internet
Author: User

The original use of vc++2010 is now replaced by the visual Studio 2013,editplus related configuration method is basically the same. The approach used is to find the Cl.bat method online, which is summarized below:

    • To the VC installation directory, I here is D:\VS\VS2013\VC\bin, here you should be able to see the Vcvars32.bat and cl.exe two files. Create a new text file, renamed Cl.bat, I am here to streamline, the content is:
@echo off Pager "%vs120comntools%vsvars32.bat"ifgoto  errorcl. Exe/eha "%1"goto: EOF : Error Echo error: Wrong parameter Goto : EOF

note that the%vs120comntools% in the different versions of VS that variable, such as VS2010 is%vs100comntools%. Specific variable name you can view system variable determination.

    • EditPlus, tools, preferences, custom tools, choose Add Tool on the right, select program , add two by this method, the content is as follows:

Tool Group name can be modified by clicking the Group name button

    • Add its buttons to the toolbar: on the EditPlus toolbar, right-click, select Custom, by configuration:

    • Now available, confirm that your tool group is selected in the custom group , tools -and. The first button is compiled to generate xx.obj and XX.exe files, and the second button is to perform XX.exe.

How to add a custom include directory, Lib directory, compile options:

1 . To add support for Visual Leak Detector As an example, this tool checks whether the program runs with memory leaks. first modify the configuration file Vld.ini in its installation directory:

2, add cld.bat batch file in cl.bat same directory, the contents are as follows:

  @echo  off  call  "%vs120comntools%vsvars32.bat" set  include=%include%;D: \vs\visual Leak Detector\include  win32  if  "%1" = = "goto   ERRORCL . exe/eha/d" _DEBUG "/MDd" %1 "goto  :eof  :error  echo   goto  :eof  

Use Visual Leak detector to add paths to Vld.h and Vld.lib under the installation directory, as shown above, notice that the equals sign in the SET command does not have spaces on either side .

You must _DEBUG macro support with Visual Leak detector, so add the/d "_DEBUG" in the cl.exe option/MDD

3. Add a button. As with the previous method of adding a compile button, simply change the cl.bat in the Command box to Cld.bat

4. Using Visual Leak Detector, a simple example is as follows:

After you run the XX.exe generated by the compile button for Cld.bat, the memory_leak_report.txt is generated in the same directory to see the details of the memory leaks when the program runs

Precautions:

    1. The path or file name does not contain spaces, or the compilation fails

EditPlus Configuration VC + + and related matters needing attention

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.