Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++/CX projects are not supported #3039

Closed
saqadri opened this issue Jan 15, 2019 · 5 comments
Closed

C++/CX projects are not supported #3039

saqadri opened this issue Jan 15, 2019 · 5 comments
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@saqadri
Copy link

saqadri commented Jan 15, 2019

Type: LanguageService

Describe the bug

  • OS and Version: Windows 10 (but shouldn't be version specific)
  • VS Code Version: 1.30.1 (but shouldn't be version specific)
  • C/C++ Extension Version: 0.20.1 (but shouldn't be version specific)
  • Other extensions you installed (and if the issue persists after disabling them): N/A
  • A clear and concise description of what the bug is:

In cl.exe, C++/CX is enabled using the /ZW flag. There is at present no facility to enable this from IntelliSense perspective in the cpptools extension.

There are some approaches to this:

  • allow a --cppcx flag on the compilerPath, similar to /clr (see C++ CLI support for assembly references #1987).
  • allow a generic compilerFlags field to specify arbitrary compiler flags, one of which could be /ZW, which then gets translated to the relevant EDG setting.

To Reproduce
Set up a C++/CX project

Expected behavior
C++/CX constructs are supported

@sean-mcmanus sean-mcmanus self-assigned this May 14, 2019
@sean-mcmanus sean-mcmanus added this to the June 2019 milestone May 14, 2019
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label May 15, 2019
@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented May 15, 2019

Do you need support for the /AI command line for adding directories to search for files when using #using? I'm not sure how important that is to add.

UPDATE: We'll just enable /AI on the compilerPath for now...we might support it via includePath later on.

@sean-mcmanus sean-mcmanus removed their assignment May 20, 2019
@sean-mcmanus sean-mcmanus added the postponed Fixed, but postponed until testing/review issues are resolved (but we have higher priority tasks). label May 22, 2019
@sean-mcmanus sean-mcmanus modified the milestones: June 2019, On Deck Jun 13, 2019
@sean-mcmanus sean-mcmanus modified the milestones: On Deck, 0.26.0 Aug 27, 2019
@sean-mcmanus sean-mcmanus self-assigned this Aug 27, 2019
@sean-mcmanus sean-mcmanus removed fixed Check the Milestone for the release in which the fix is or will be available. postponed Fixed, but postponed until testing/review issues are resolved (but we have higher priority tasks). labels Sep 18, 2019
@sherryyshi
Copy link
Contributor

Hi @sean-mcmanus ,
Bob mentioned that you will be enabling this through the compilerArgs param. FYI to enable C++/CX we specify the following compiler args:
ZW, /ZW:nostdlib, /FU<platform.winmd>, /FU<Windows.winmd>, /AI<metadataDirectory>

Currently the .winmd files are passed into the forcedInclude param - let me know if we should change that.

Also, let me know if you want me to test out your implementation as I'm currently looking into enabling this scenario.

Thanks,
Sherry

@sean-mcmanus
Copy link
Collaborator

@sherryyshi Yeah, thanks for the info. We process the /ZW and /AI, but not the /ZW:nostdlib and /FU flags, i.e. we automatically use the platform.winmd and windows.winmd -- did you need those set in a special way that is different from their default locations. I can send you a .vsix with the change when I get it finalized/tested.

@sean-mcmanus sean-mcmanus added fixed Check the Milestone for the release in which the fix is or will be available. and removed quick fix labels Oct 9, 2019
@sean-mcmanus sean-mcmanus removed their assignment Oct 15, 2019
@sean-mcmanus
Copy link
Collaborator

We added support for /ZW, /ZW:nostdlib, /FI, /FU, and /AI compiler arguments. See https://docs.microsoft.com/en-us/cpp/cppcx/compiler-and-linker-options-c-cx?view=vs-2019 . compilerPath needs to be set for "cl.exe" except in the special case where a custom configuration provider is used, in which case compilerPath can be "", but the path to vccorlib.h needs to be in the includePath (in addition to be specified with the /FI flag or forcedInclude setting).

@sean-mcmanus
Copy link
Collaborator

C++/CX is available with 0.26.0.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

3 participants