locked
Visual Studio - compiler errors , linkage specifiation

    Question

  • Hello.

    When I try to build Windows Store (8.1) application I get bunch of errors like:

        26    IntelliSense: not a class or struct name    d:\Program Files (x86)\Windows Kits\8.1\Include\winrt\inspectable.h    100 ,

    Error    18    error C2598: linkage specification must be at global scope    d:\program files (x86)\windows kits\8.1\include\winrt\activation.h    84    1    App7


    It all started when I tried to compile code which used IInspectable - now every Windows Store C++ project fails to build.

    I tried to repair Visual Studio and reinstall it - it didn't help. How can I fix that?


    • Edited by fex_ Sunday, February 16, 2014 5:22 PM
    Sunday, February 16, 2014 5:21 PM

Answers

  • Hi,

    You can share your main code in the forum so that we can test it.

    And like the error indicates: "linkage specification must be at global scope", may be you put some  Header files contain in a funcation or missing a } ending brace somewhere.

    Best Wishes!   


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, February 17, 2014 8:35 AM
  • Visual C++ uses a separate compiler to provide Intellisense information in the background as you type. This compiler can get out of sync with your code temporarily and therefore an Intellisense error might sometimes be spurious. Does your code actually fail to compile or does it succeed? If it fails, what are the errors reported by the "real" compiler?
    Tuesday, February 18, 2014 8:05 PM

All replies

  • Hi,

    You can share your main code in the forum so that we can test it.

    And like the error indicates: "linkage specification must be at global scope", may be you put some  Header files contain in a funcation or missing a } ending brace somewhere.

    Best Wishes!   


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, February 17, 2014 8:35 AM
  • Visual C++ uses a separate compiler to provide Intellisense information in the background as you type. This compiler can get out of sync with your code temporarily and therefore an Intellisense error might sometimes be spurious. Does your code actually fail to compile or does it succeed? If it fails, what are the errors reported by the "real" compiler?
    Tuesday, February 18, 2014 8:05 PM