Notepad ++ configure Dev-C ++ Compiler

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:

 

Create a folder named "code1" in disk D ".

 

Enter and save as F9: CMD/K g ++-g-w-wall-o "D:/code1/example (name_part1_.exe" "$ (full_current_path)" & "D: /code1/clusters (name_partcmd.exe "$ (full_current_path) & Exit

Press F9 to compile and run the program. Then, enter the data and try again. Then, you can see that the D:/code/file has been (name_partcmd.exe file.

 

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 bin directory of GCC has been set in the system environment variable. 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.