{"action":"created","issue":{"url":"https://api.github.com/repos/mono/CppSharp/issues/556","labels_url":"https://api.github.com/repos/mono/CppSharp/issues/556/labels{/name}","comments_url":"https://api.github.com/repos/mono/CppSharp/issues/556/comments","events_url":"https://api.github.com/repos/mono/CppSharp/issues/556/events","html_url":"https://github.com/mono/CppSharp/issues/556","id":107499085,"number":556,"title":"MS Visual Studio 2015 issues","user":{"login":"vonzepp","id":6917052,"avatar_url":"https://avatars.githubusercontent.com/u/6917052?v=3","gravatar_id":"","url":"https://api.github.com/users/vonzepp","html_url":"https://github.com/vonzepp","followers_url":"https://api.github.com/users/vonzepp/followers","following_url":"https://api.github.com/users/vonzepp/following{/other_user}","gists_url":"https://api.github.com/users/vonzepp/gists{/gist_id}","starred_url":"https://api.github.com/users/vonzepp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vonzepp/subscriptions","organizations_url":"https://api.github.com/users/vonzepp/orgs","repos_url":"https://api.github.com/users/vonzepp/repos","events_url":"https://api.github.com/users/vonzepp/events{/privacy}","received_events_url":"https://api.github.com/users/vonzepp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-21T12:22:40Z","updated_at":"2015-09-21T17:07:22Z","closed_at":null,"body":"I have final release of VS2015 (14.0.23107.0).\r\nI found 2 problems in cppSharp with VS2015:\r\n\r\n1) I have Windows 7 x64 SP1. No addition SDK were installed (except SDK's, shipped with Visual Studio). cppSharp crashes in:\r\n    MSVCToolchain.GetSystemIncludes\r\nI specified function parameter vsVersion = VisualStudioVersion.VS2015 explicitely, due to code:\r\n```\r\n            // Clang cannot deal yet with VS 2015, so remove it from SDKs.\r\n            if (vsVersion == VisualStudioVersion.Latest)\r\n                vsSdks.Remove(vsSdks.Find(version =>\r\n                    (int) version.Version == GetVisualStudioVersion(vsVersion)));\r\n```\r\n![untitled](https://cloud.githubusercontent.com/assets/6917052/9991500/2c129eb8-6073-11e5-91e8-780c690b7f1f.png)\r\nAnother problem is with windowsKitSDK, code generated path:\r\n\"C:\\\\Program Files (x86)\\\\Windows Kits\\\\10\\\\include\\\\%UCRTVersion%\\\\ucrt\"\r\nshould be: c:\\\\Program Files (x86)\\\\Windows Kits\\\\10\\\\include\\\\10.0.10150.0\\ucrt\\\r\nso %UCRTVersion% is not replaced with numeric value.\r\n\r\nWorkaround is not to use automatic lookup of Include directories and adding them explicitely.\r\n\r\n2) The second problem is with undefined 'char32_t' and 'char16_t'. Those types are internal for VC++14 and not defined by typedefs.\r\nclang errors:\r\n```\r\n5>C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\include\\xtr1common(231,22): error : use of undeclared identifier 'char16_t'\r\n5>C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\include\\xtr1common(237,22): error : use of undeclared identifier 'char32_t'\r\n5>C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\include\\xstddef(408,14): error : use of undeclared identifier 'char16_t'\r\n5>C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\include\\xstddef(414,14): error : use of undeclared identifier 'char32_t'\r\n5>C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\include\\limits(615,33): error : use of undeclared identifier 'char16_t'\r\n```\r\nI found clang fix for that:\r\nhttps://llvm.org/bugs/show_bug.cgi?id=22939\r\nBut it's still an issue in cppSharp.\r\n\r\nMy workaround is not use '-fms-compatibility' clang switch. So I commented line in Parser.cpp:\r\n```\r\n    // Enable the Microsoft parsing extensions\r\n    if (Opts->MicrosoftMode)\r\n    {\r\n        args.push_back(\"-fms-extensions\");\r\n//        args.push_back(\"-fms-compatibility\");\r\n        args.push_back(\"-fdelayed-template-parsing\");\r\n    }\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mono/CppSharp/issues/comments/142044609","html_url":"https://github.com/mono/CppSharp/issues/556#issuecomment-142044609","issue_url":"https://api.github.com/repos/mono/CppSharp/issues/556","id":142044609,"user":{"login":"tritao","id":602268,"avatar_url":"https://avatars.githubusercontent.com/u/602268?v=3","gravatar_id":"","url":"https://api.github.com/users/tritao","html_url":"https://github.com/tritao","followers_url":"https://api.github.com/users/tritao/followers","following_url":"https://api.github.com/users/tritao/following{/other_user}","gists_url":"https://api.github.com/users/tritao/gists{/gist_id}","starred_url":"https://api.github.com/users/tritao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tritao/subscriptions","organizations_url":"https://api.github.com/users/tritao/orgs","repos_url":"https://api.github.com/users/tritao/repos","events_url":"https://api.github.com/users/tritao/events{/privacy}","received_events_url":"https://api.github.com/users/tritao/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T17:07:22Z","updated_at":"2015-09-21T17:07:22Z","body":"I tried it here and it does work but you also need to remove `-fms-compatibility` from the parser setup code because it overrides the option passed in the managed side. I will clean it up later."}}