Vc_sqlserver -- 'enum' type redefinition: 6 Error 1 alert (see photo album 1 01)

Source: Internet
Author: User

[Disclaimer: some of the content in this article is derived from network information and cannot be determined due to attribution issues. No source of citation is provided here. If you have any copyright issues, please contact us and delete the content suspected of copyright issues in a timely manner !]

 

 

Error description:

-------------------- Configuration: myproject-Win32 debug --------------------
Compiling...
Stdafx. cpp
G:/temp/myproject/debug/msado15.tlh (171): Error c2011: 'locktypenum': 'enum' type redefinition
G:/temp/myproject/debug/msado15.tlh (214): Error c2011: 'peypeenum': 'enum' type redefinition
G:/temp/myproject/debug/msado15.tlh (258): Error c2011: 'fieldattributenum': 'enum' type redefinition
G:/temp/myproject/debug/msado15.tlh (279): Error c2011: 'editmodemonum': 'enum' type redefinition
G:/temp/myproject/debug/msado15.tlh (287): Error c2011: 'recordstatusenum': 'enum' type redefinition
G:/temp/myproject/debug/msado15.tlh (407): Warning c4146: unary minus operator applied to unsigned type, result still unsigned
G:/temp/myproject/debug/msado15.tlh (531): Error c2011: 'parameterdirectionenum': 'enum' type redefinition
Error executing cl.exe.

Myproject.exe-6 error (s), 1 warning (s)

Solution:

Solution 1: (1) According to the prompt, redefinition is found; (2) files with errors are concentrated in the debug project file. Try to delete msado15.tlh and build again. the problem persists.

Solution 2: (1) Find the same problem on the Internet; (2) find a solution on csdn and apply it to your own program (method 1 successfully solves the problem ),

(1)
# Pragma warning (Disable: 4146)
# Import "C:/program files/common files/system/ADO/msado15.dll" named_guids Rename ("EOF", "adoeof"), rename ("Bof", "adobof ")
# Pragma warning (default: 4146)
Using namespace ADODB;
(2)
# Pragma warning (Disable: 4146)
# Import "C:/program files/common files/system/ADO/msado15.dll" no_namespace Rename ("EOF", "adoeof") Rename ("datatypeenum", "adodatatypeenum ") rename ("Expiration", "Expiration") Rename ("editmodeenum", "adoeditmodeenum") Rename ("locktypeenum", "adolocktypeenum") Rename ("recordstatusenum", "Expiration ") rename ("parameterdirectionenum", "adoparameterdirectionenum ")

 

The result is as follows:

-------------------- Configuration: myproject-Win32 debug --------------------
Compiling...
Stdafx. cpp
Compiling...
Skipping... (no relevant changes detected)
_ Recordset. cpp
Adodc. cpp
Column. cpp
Columns. cpp
Dataformatdisp. cpp
DataGrid. cpp
Field. cpp
Fields. cpp
Font. cpp
Mainfrm. cpp
Myproject. cpp
Myprojectdoc. cpp
Myprojectset. cpp
Myprojectview. cpp
Picture. cpp
Properties. cpp
Property. cpp
Selbookmarks. cpp
Split. cpp
Splits. cpp
Stddataformatsdisp. cpp
Linking...

Myproject.exe-0 error (s), 0 warning (s)
(3) The problem can be solved. The reason is still unclear. You can leave a wedge to be confirmed later.

Background :......................................................................................................

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.