Use the wdk compiling environment to compile the application build command (console Program)

Source: Internet
Author: User

Targetname = console
Targettype = Program

Sources = console. cpp \

Use_msvcrt = 1

Umtype = console
Umlibs = $ (sdk_lib_path) \ gdi32.lib \
$ (Sdk_lib_path) \ user32.lib \
$ (Sdk_lib_path) \ kernel32.lib \

$ (Sdk_lib_path) \ NTDLL. Lib \

Above is the content of the sources File

! Include $ (ntmakeenv) \ makefile. Def

Makefile is just a piece of code.

Console. cpp source file

# Include "stdio. H"

Int main ()
{
Printf ("Hello world! \ N ");
Getchar ();
Return 0;
}

Save the three sections above, namely, sources, makefile, and console. cpp, and put them in the same level directory. Then open the wdk compiling environment and switch to this directory and directly enter the command:

Build-C

You can compile the EXE program.


This shows how to compile the console program.

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.