locked
Issues of building Win8 Metro D3D application using Static Runtime library

    Question

  • Hi:

    I installed VS ultimate 2011 in Win8 OS 8250.

    But hit a problem of building Win8 Metro D3D application using Static Runtime library ( Multi-threaded (/MT) )

    The output result is below.

    1>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vccorlib.h(80): error C3083: 'Platform': the symbol to the left of a '::' must be a type


    1>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vccorlib.h(80): error C2039: 'Guid' : is not a member of '`global namespace''


    1>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vccorlib.h(80): error C2061: syntax error : identifier 'Guid'


    1>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vccorlib.h(83): error C3083: 'Platform': the symbol to the left of a '::' must be a type


    1>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vccorlib.h(83): error C2039: 'Guid' : is not a member of '`global namespace''


    1>C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vccorlib.h(83): error C2061: syntax error : identifier 'Guid'


    Metro D3D application could be complied correctly in previous VS2011 version in 8102 Win8.

    Best Regards

    Weiyi

    • Moved by Bob_Bao Tuesday, March 6, 2012 5:34 AM (From:Team Foundation Server - Setup)
    Monday, March 5, 2012 6:34 AM

All replies

    • Proposed as answer by Bob_Bao Tuesday, March 6, 2012 5:33 AM
    Tuesday, March 6, 2012 1:44 AM
  • try adding the following to complier option:

    /FU Platform.winmd /FU Windows.winmd /AI "c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcpackages" /AI "$(WindowsSDK_MetadataPath)"

    change to correct drive where vs2011 installed

    • Proposed as answer by Vladbph Monday, April 9, 2012 5:08 PM
    Monday, April 9, 2012 5:08 PM
  • Hi now the error message has changed to

    1>   \Tools\WPE\CRT\inc\vccorlib.h(356): error C2535: 'Platform::Object::Object(void)' : member function already defined or declared
    1>          c:\program files (x86)\microsoft visual studio 12.0\vc\vcpackages\platform.winmd : see declaration of 'Platform::Object::Object'
    1>          This diagnostic occurred while importing type 'Platform::Object ' from assembly 'platform, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'.
    1>   \Tools\WPE\CRT\inc\vccorlib.h(589): error C2535: 'Platform::Metadata::Attribute::Attribute(void)' : member function already defined or declared
    1>          c:\program files (x86)\microsoft visual studio 12.0\vc\vcpackages\platform.winmd : see declaration of 'Platform::Metadata::Attribute::Attribute'
    1>          This diagnostic occurred while importing type 'Platform::Metadata::Attribute ' from assembly 'platform, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'.
    1>          This diagnostic occurred while importing type 'Windows::Foundation::Metadata::MarshalingBehaviorAttribute ' from assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'.
    1>   \Tools\WPE\CRT\inc\vccorlib.h(589): error C2535: 'Platform::ValueType::ValueType(void)' : member function already defined or declared
    1>          c:\program files (x86)\microsoft visual studio 12.0\vc\vcpackages\platform.winmd : see declaration of 'Platform::ValueType::ValueType'
    1>          This diagnostic occurred while importing type 'Platform::ValueType ' from assembly 'platform, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'.
    1>          This diagnostic occurred while importing type 'Platform::Enum ' from assembly 'platform, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'.
    1>   \Tools\WPE\CRT\inc\vccorlib.h(589): error C2535: 'Platform::Enum::Enum(void)' : member function already defined or declared
    1>          c:\program files (x86)\microsoft visual studio 12.0\vc\vcpackages\platform.winmd : see declaration of 'Platform::Enum::Enum'
    1>          This diagnostic occurred while importing type 'Platform::Enum ' from assembly 'platform, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'.
    1>   \Tools\WPE\CRT\inc\vccorlib.h(654): fatal error C1903: unable to recover from previous error(s); stopping compilation

    Any idea what can be done to get around this ?


    Tuesday, January 28, 2014 2:24 PM