Notepad ++ configure C and C ++ Compilers

Source: Internet
Author: User

I. Software Installation

I am using Dev-C ++, mainly using its GCC and G ++, notepad ++ 5.6.6

2. Set Dev-C ++ Environment Variables

1. Set the path of the compiler and add D:/dev-CPP/bin to the path of the Windows environment variable. Do not forget to add a semicolon before and remove it from others.
2. Set the path of the C Language header file and add c_include_path to the environment variable to set its value to D:/dev-CPP/include.

3. set the path of the C ++ header file and add an environment variable cplus_include_path to set the value to D:/dev-CPP/include/C ++/3.4.2; D: /dev-CPP/include/C ++/3.4.2/mingw32; D:/dev-CPP/include/C ++/3.4.2/backward; D:/dev-CPP/include

4. Set the path of the library file and add the knowledge variable LIBRARY_PATH to set its value to D:/dev-CPP/lib.

5. Test the mingw environment:
/** Hello. C */
# Include "iostream" int main () {STD: cout <"Hello World" <STD: Endl ;}

6. Open CMD and enter g ++ hello. C-o hello.exe. If no error is reported, it should be successful.

3. Set notepad ++

Run notpad ++ and click "Run-" run ". A pop-up box is displayed.

Save the following commands separately and thenA name and shortcut key:

C ++ Compiler:

Compile:
CMD/K g1_cmd.exe-g-w-wall-o $ (current_directory)/cmd(name_partcmd.exe $ (full_current_path)
Run:
CMD/K $ (current_directory)/configure (name_part1_.exe $ (full_current_path
Debugging:
CMD/k gdb $ (current_directory)/cmd(name_partcmd.exe
C compiler:
Compile:
CMD/K gcc-o $ (current_directory)/configure (name_partcmd.exe "$ (full_current_path)" & pause & Exit
Run:
CMD/K $ (current_directory)/configure (name_part1_.exe $ (full_current_path

Note:
The quotation marks must not be omitted if the file name or path contains spaces.
& Pause indicates that after the command is run, the pause waits for the keyboard operation
& Exit indicates that after the operation is complete, exit the running window and return to notepad ++.
The GCC bin directory has already been set in the system environment variables. Otherwise, you must complete the absolute path of the GCC command.

 
Related Article

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.