Error c2220: Warning treated as error-no object file generated

Source: Internet
Author: User
Wdk/ddk in the error c2220: Warning treated as error-No 'object' file generated2009-04-01

Search online and save

It is actually about turning off the compilation option...

The most mentioned online is the modification of the wdkpath/i386.inc file.


MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) $(COMPILER_WX_SWITCH)

Change

MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) $(COMPILER_WX_SWITCH)

Msc_warning_level =/W1

There is another way... In fact, there is no need to move inc files.

Of course, it is not added in sources as mentioned in Google. Anyway, how can I add it? I cannot add it to any location...

Directly add the last line of the MAKEFILE file in the project
Msc_warning_level =/W1

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

During the past few days, I was busy converting the previously written driver into the wdk compiling environment and encountered a problem:

Free: c2220: Warning treated as error-No 'object' file generated

This problem occurs because the code is not rigorous. I am too lazy to analyze the specific situation. You can search.

For the lazy, the solution is to modify the sources file of the current driver project to reduce the warning level.
The Code is as follows:

! If $ (freebuild)
Msc_warning_level =/W1
! Else
Msc_warning_level =/W3
! Endif

If the warning level is set to 1 during free compilation, otherwise the default value is 3.

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Change warning level:
If you encounter the following error and it is not a code issue, you need to change the warning level:
Error c2220: Warning treated as error

Modification method:
Replace the value of msc_warning_level of i1_mk. Inc in the bin directory with/W1.
Add a row as follows:
Msc_warning_level = $ (msc_warning_level) $ (compiler_wx_switch)
Msc_warning_level =/W1

 

 

 

From: http://hi.baidu.com/xicao54007/blog/item/0bc0370f806eb6e5aa645769.html

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.