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++/winrt][get started] add a note about #pragma #2419

Closed
profnandaa opened this issue May 2, 2020 · 2 comments
Closed

[c++/winrt][get started] add a note about #pragma #2419

profnandaa opened this issue May 2, 2020 · 2 comments
Assignees
Labels
platform/tech Pri1 support-request A support-style question where the customer needs help solving a problem. uwp/prod

Comments

@profnandaa
Copy link

profnandaa commented May 2, 2020

I was getting errors when building until I added #pragma comment(lib, "windowsapp") on pch,h; that I found on the moderncpp.com site

Could we have note about this in the getting started? Can be a huge stumbling block for someone just starting on this.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@profnandaa profnandaa changed the title [get started] add a note about #pragma [c++/winrt][get started] add a note about #pragma May 2, 2020
@stevewhims stevewhims added the support-request A support-style question where the customer needs help solving a problem. label May 3, 2020
@stevewhims
Copy link
Member

Hi, @profnandaa, and thanks for filing this issue. You don't have to explicitly link to WindowsApp.lib if you set up C++/WInRT in the recommended way. For more info and links, see the section in the FAQ about WindowsApp.lib, and why you (nearly always) don't need to link to it. There are very corner cases where you do need to link explicitly, but those are extremely rare (often internal Microsoft devs do), and not recommended for customers. :)

The blog post you link to is a very early one, from 2017, so you don't need to do that any longer.

Thanks again!
Steve

@profnandaa
Copy link
Author

Got it, thanks!

QuinnRadich pushed a commit that referenced this issue Mar 31, 2022
* Additional 1.1-preview1 rel note comments

* Update preview-channel.md

Consistent "currently". Couple other minor tweaks.

* Resolving conflict

* Stwhi conflicts (#2422)

* TOC (#2415)

* Fix link to arm abi (#2416)

* Fix broken download link (#2414)

* You can combine different WINRT_NATVIS settings (#2418)

* You can combine different WINRT_NATVIS settings

`WINRT_NATVIS` can also be set differently by different files. If any file enables `WINRT_NATVIS` (either explicitly or implicitly by defining `_DEBUG`), then the resulting module gets natvis support.

* Update macros.md

Co-authored-by: Steven White <[email protected]>

* Clarify when runtime is needed for push (#2419)

Co-authored-by: Matt Wojciakowski <[email protected]>
Co-authored-by: angelazhangmsft <[email protected]>
Co-authored-by: Raymond Chen <[email protected]>

* Addressing comments

* Consistency with the other change to "evaluating".

* Notifications and self-contained deployment clarifications

Co-authored-by: Steven White <[email protected]>
Co-authored-by: Matt Wojciakowski <[email protected]>
Co-authored-by: angelazhangmsft <[email protected]>
Co-authored-by: Raymond Chen <[email protected]>
QuinnRadich pushed a commit that referenced this issue Jun 3, 2022
* Remove references to Reveal Highlight style

Removing reference to Reveal Highlight from the Reveal Focus style page.
- Ref in parens near top.
- Referred to in Related articles links.
The Reveal Highlight page was removed.

* Update date

* Revert "Update date"

This reverts commit da0ca4d.

* Update date on reveal-focus

* Fix month on date in header

* Update PT Run docs

* fixes

* layout improvement

* fixes, update calculator table

* improve image

* fix spelling in clac warning

* fix spaces

* Update composition-effects.md and fix compile

* [BrokenLinksH2] Fixed the link path

Fixed the link path

* [BrokenLinksH2] Fixed the link path

Fixed the link path

* fix hyperbolic calc operations

* Update installer link from WinUI3 tutorial

* Improve the downloads page (#2350)

* Update downloads.md

* Update downloads.md

* Update downloads.md

* Update downloads.md

* Update downloads.md

* Update downloads.md

* feedback

* remove VSIX and formatting

* Update downloads.md

* Update apply-rounded-corners.md

Wording changes and improved the P/Invoke signature to throw exceptions rather than return HRESULT.

* fixing typo (#2395)

* [BrokenLinksH2] Fixed the link path

Fixed the link filenames

* [BrokenLinksH2] Fixed the link path

Fixed the link path

* [BrokenLinksH2] Fixed the link path

Fixed the link

* [BrokenLinksH2] Fixed the link path

Fixed the link path

* resolve feedback

* update keyword list

* improvements

* fixes

* Info adjustments

* fix table

* Release appsdk 1.1 preview1 (#2332)

Publish docs to accompany Windows App SDK v1.1 preview 1

* Update release cadence table to 1.1.0-preview1 (#2408)

* Fix downloads link in 1.1 Preview 1 Rel Notes (#2409)

* Fix downloads link in 1.1 Preview 1 Rel Notes

* Once more

* Update preview-channel.md

Co-authored-by: Steven White <[email protected]>

* Add minimum .NET SDK version to 1.1-preview1 relnote (#2410)

* Update preview-channel.md

* Update preview-channel.md

* Update preview-channel.md

Co-authored-by: Steven White <[email protected]>

* new topic about config macros (#2411)

* polish (#2412)

* layout adjustments and requirements list update

* small fixes

* [BrokenLinksH2] Hid the broken link

Commented the broken link

* Add Arm64EC ABI doc (#2337)

* Author new Arm64EC ABI doc

* TOC (#2415)

* Fix link to arm abi (#2416)

* Fix broken download link (#2414)

* You can combine different WINRT_NATVIS settings (#2418)

* You can combine different WINRT_NATVIS settings

`WINRT_NATVIS` can also be set differently by different files. If any file enables `WINRT_NATVIS` (either explicitly or implicitly by defining `_DEBUG`), then the resulting module gets natvis support.

* Update macros.md

Co-authored-by: Steven White <[email protected]>

* Clarify when runtime is needed for push (#2419)

* Fix sub commands in "update" section

The "update all" section mistakenly left out that "update" is a sub-command of "source", as it does not work on its own as a top level winget command.

Additionally, these two update commands listed "C:\" at the beginning, which naturally only works if winget is located at the root of the C drive, which is not normally the case, nor do the other examples list this - thus, this has been removed.

* Additional 1.1-preview1 rel note comments (#2421)

* Additional 1.1-preview1 rel note comments

* Update preview-channel.md

Consistent "currently". Couple other minor tweaks.

* Resolving conflict

* Stwhi conflicts (#2422)

* TOC (#2415)

* Fix link to arm abi (#2416)

* Fix broken download link (#2414)

* You can combine different WINRT_NATVIS settings (#2418)

* You can combine different WINRT_NATVIS settings

`WINRT_NATVIS` can also be set differently by different files. If any file enables `WINRT_NATVIS` (either explicitly or implicitly by defining `_DEBUG`), then the resulting module gets natvis support.

* Update macros.md

Co-authored-by: Steven White <[email protected]>

* Clarify when runtime is needed for push (#2419)

Co-authored-by: Matt Wojciakowski <[email protected]>
Co-authored-by: angelazhangmsft <[email protected]>
Co-authored-by: Raymond Chen <[email protected]>

* Addressing comments

* Consistency with the other change to "evaluating".

* Notifications and self-contained deployment clarifications

Co-authored-by: Steven White <[email protected]>
Co-authored-by: Matt Wojciakowski <[email protected]>
Co-authored-by: angelazhangmsft <[email protected]>
Co-authored-by: Raymond Chen <[email protected]>

* Update what's new (#2424)

* Jken whatsnew mar22 (#2425)

* Update what's new

* Corrected broken links

* support nuance (#2426)

* Add 0.8.7 release notes (#2423)

* Add 0.8.7 release notes

* address feedback

* formatting

* Update stable-channel.md

Co-authored-by: Steven White <[email protected]>

* remove WinUI 3 margins

* latest available (#2428)

* fix broken link (#3764)

* naming convention (#2431)

* naming convention

* parens

* Updates to disadvantages. (#2432)

* Added instructions for hybrid CRT. (#2433)

* Added instructions for hybrid CRT.

* Update deploy-self-contained-apps.md

Co-authored-by: Steven White <[email protected]>

* Improved HybridCRT.props guidance. (#2434)

* Update Pivot recommendations

* fix link

* updating descriptions (#2437)

* typo

* Java path correction

As pointed out in issue #3721

* resolving conflicts

* Add note for winget upgrade (#2439)

* resolving build issues (#2440)

* resolving build issues

* fixing another issue

* fixing another issue 2

* fixing conflicts 2

Co-authored-by: Alvin Ashcraft <[email protected]>
Co-authored-by: htcfreek <[email protected]>
Co-authored-by: lindexi <[email protected]>
Co-authored-by: Sid Lama <[email protected]>
Co-authored-by: PRMerger16 <[email protected]>
Co-authored-by: PRMerger7 <[email protected]>
Co-authored-by: angelazhangmsft <[email protected]>
Co-authored-by: KB <[email protected]>
Co-authored-by: Peter Torr (MSFT) <[email protected]>
Co-authored-by: PRMerger8 <[email protected]>
Co-authored-by: PRMerger19 <[email protected]>
Co-authored-by: Linda Spiller <[email protected]>
Co-authored-by: Shannon Leavitt <[email protected]>
Co-authored-by: MB <[email protected]>
Co-authored-by: Gabby Bilka <[email protected]>
Co-authored-by: Matt Wojciakowski <[email protected]>
Co-authored-by: Raymond Chen <[email protected]>
Co-authored-by: Kade <[email protected]>
Co-authored-by: PRMerger3 <[email protected]>
Co-authored-by: John Kennedy <[email protected]>
Co-authored-by: Jim Walker (WINDOWS) <[email protected]>
Co-authored-by: PRMerger5 <[email protected]>
Co-authored-by: Mike Battista <[email protected]>
Co-authored-by: PRMerger9 <[email protected]>
QuinnRadich pushed a commit that referenced this issue Jun 3, 2022
* Remove references to Reveal Highlight style

Removing reference to Reveal Highlight from the Reveal Focus style page.
- Ref in parens near top.
- Referred to in Related articles links.
The Reveal Highlight page was removed.

* Update date

* Revert "Update date"

This reverts commit da0ca4d.

* Update date on reveal-focus

* Fix month on date in header

* Update PT Run docs

* fixes

* layout improvement

* fixes, update calculator table

* improve image

* fix spelling in clac warning

* fix spaces

* Update composition-effects.md and fix compile

* [BrokenLinksH2] Fixed the link path

Fixed the link path

* [BrokenLinksH2] Fixed the link path

Fixed the link path

* fix hyperbolic calc operations

* Update installer link from WinUI3 tutorial

* Improve the downloads page (#2350)

* Update downloads.md

* Update downloads.md

* Update downloads.md

* Update downloads.md

* Update downloads.md

* Update downloads.md

* feedback

* remove VSIX and formatting

* Update downloads.md

* Update apply-rounded-corners.md

Wording changes and improved the P/Invoke signature to throw exceptions rather than return HRESULT.

* fixing typo (#2395)

* [BrokenLinksH2] Fixed the link path

Fixed the link filenames

* [BrokenLinksH2] Fixed the link path

Fixed the link path

* [BrokenLinksH2] Fixed the link path

Fixed the link

* [BrokenLinksH2] Fixed the link path

Fixed the link path

* resolve feedback

* update keyword list

* improvements

* fixes

* Info adjustments

* fix table

* Release appsdk 1.1 preview1 (#2332)

Publish docs to accompany Windows App SDK v1.1 preview 1

* Update release cadence table to 1.1.0-preview1 (#2408)

* Fix downloads link in 1.1 Preview 1 Rel Notes (#2409)

* Fix downloads link in 1.1 Preview 1 Rel Notes

* Once more

* Update preview-channel.md

Co-authored-by: Steven White <[email protected]>

* Add minimum .NET SDK version to 1.1-preview1 relnote (#2410)

* Update preview-channel.md

* Update preview-channel.md

* Update preview-channel.md

Co-authored-by: Steven White <[email protected]>

* new topic about config macros (#2411)

* polish (#2412)

* layout adjustments and requirements list update

* small fixes

* [BrokenLinksH2] Hid the broken link

Commented the broken link

* Add Arm64EC ABI doc (#2337)

* Author new Arm64EC ABI doc

* TOC (#2415)

* Fix link to arm abi (#2416)

* Fix broken download link (#2414)

* You can combine different WINRT_NATVIS settings (#2418)

* You can combine different WINRT_NATVIS settings

`WINRT_NATVIS` can also be set differently by different files. If any file enables `WINRT_NATVIS` (either explicitly or implicitly by defining `_DEBUG`), then the resulting module gets natvis support.

* Update macros.md

Co-authored-by: Steven White <[email protected]>

* Clarify when runtime is needed for push (#2419)

* Fix sub commands in "update" section

The "update all" section mistakenly left out that "update" is a sub-command of "source", as it does not work on its own as a top level winget command.

Additionally, these two update commands listed "C:\" at the beginning, which naturally only works if winget is located at the root of the C drive, which is not normally the case, nor do the other examples list this - thus, this has been removed.

* Additional 1.1-preview1 rel note comments (#2421)

* Additional 1.1-preview1 rel note comments

* Update preview-channel.md

Consistent "currently". Couple other minor tweaks.

* Resolving conflict

* Stwhi conflicts (#2422)

* TOC (#2415)

* Fix link to arm abi (#2416)

* Fix broken download link (#2414)

* You can combine different WINRT_NATVIS settings (#2418)

* You can combine different WINRT_NATVIS settings

`WINRT_NATVIS` can also be set differently by different files. If any file enables `WINRT_NATVIS` (either explicitly or implicitly by defining `_DEBUG`), then the resulting module gets natvis support.

* Update macros.md

Co-authored-by: Steven White <[email protected]>

* Clarify when runtime is needed for push (#2419)

Co-authored-by: Matt Wojciakowski <[email protected]>
Co-authored-by: angelazhangmsft <[email protected]>
Co-authored-by: Raymond Chen <[email protected]>

* Addressing comments

* Consistency with the other change to "evaluating".

* Notifications and self-contained deployment clarifications

Co-authored-by: Steven White <[email protected]>
Co-authored-by: Matt Wojciakowski <[email protected]>
Co-authored-by: angelazhangmsft <[email protected]>
Co-authored-by: Raymond Chen <[email protected]>

* Update what's new (#2424)

* Jken whatsnew mar22 (#2425)

* Update what's new

* Corrected broken links

* support nuance (#2426)

* Add 0.8.7 release notes (#2423)

* Add 0.8.7 release notes

* address feedback

* formatting

* Update stable-channel.md

Co-authored-by: Steven White <[email protected]>

* remove WinUI 3 margins

* latest available (#2428)

* fix broken link (#3764)

* naming convention (#2431)

* naming convention

* parens

* Updates to disadvantages. (#2432)

* Added instructions for hybrid CRT. (#2433)

* Added instructions for hybrid CRT.

* Update deploy-self-contained-apps.md

Co-authored-by: Steven White <[email protected]>

* update page

* smal fixes

* Improved HybridCRT.props guidance. (#2434)

* Update Pivot recommendations

* fix link

* updating descriptions (#2437)

* typo

* Java path correction

As pointed out in issue #3721

* Add note for winget upgrade (#2439)

* resolving build issues (#2440)

* resolving build issues

* fixing another issue

* fixing another issue 2

* updating as per feedbafck (#2442)

* fix LayoutCycleException link

* Stwhi main/bootstrap cs 1 (#2444)

* C# APIs

* ready for review

* TOC

* formatting

* more corrections

* last corrections

* Update index.md

* Update docs for Windows App SDK 1.0.2  (#2441)

* Update 1.0.2 downloads

* Update downloads.md

* Add servicing-1.0.2 release notes and channel updates

* Update release-channels.md

* Update with CRT note

* Fix misdirected link

* Update hub/apps/windows-app-sdk/stable-channel.md

Co-authored-by: Gabby Bilka <[email protected]>
Co-authored-by: Steven White <[email protected]>
Co-authored-by: Gabby Bilka <[email protected]>
Co-authored-by: MatchaMatch <[email protected]>

* Added note about UseCrtSDKReferenceStaticWarning. (#2446)

* Link to sample parent directory rather than to the unpackaged sample. (#2447)

* Fix old link

* Adding a simple orientation page for toast notifications. Added desktop page back into TOC

* Forgot to add the overview page to the TOC

* Forgot to add the overview page to the TOC

* feedback and new shortcut

* small adjustment

* fix table

* fix tables

* spell fix

* Update Windows Runtime Component/Background Task migration (#2451)

* add links from UWP to Desktop WRCs

* update backgroundtask info

* add row for windows runtime components

* edits

* fix link

* fix support

* Edits

* edits

* Update feature-mapping-table.md

* Update creating-windows-runtime-components-in-csharp-and-visual-basic.md

* Update index.md

Co-authored-by: Steven White <[email protected]>

* Updates per PR review

* Fix spelling error

* Adding H1

* gitissue#3769-delete-image (#2461)

* fixing build issues

* fixing TBD (#2464)

Co-authored-by: Alvin Ashcraft <[email protected]>
Co-authored-by: htcfreek <[email protected]>
Co-authored-by: lindexi <[email protected]>
Co-authored-by: Sid Lama <[email protected]>
Co-authored-by: PRMerger16 <[email protected]>
Co-authored-by: PRMerger7 <[email protected]>
Co-authored-by: angelazhangmsft <[email protected]>
Co-authored-by: KB <[email protected]>
Co-authored-by: Peter Torr (MSFT) <[email protected]>
Co-authored-by: PRMerger8 <[email protected]>
Co-authored-by: PRMerger19 <[email protected]>
Co-authored-by: Linda Spiller <[email protected]>
Co-authored-by: Shannon Leavitt <[email protected]>
Co-authored-by: MB <[email protected]>
Co-authored-by: Gabby Bilka <[email protected]>
Co-authored-by: Matt Wojciakowski <[email protected]>
Co-authored-by: Raymond Chen <[email protected]>
Co-authored-by: Kade <[email protected]>
Co-authored-by: PRMerger3 <[email protected]>
Co-authored-by: John Kennedy <[email protected]>
Co-authored-by: Jim Walker (WINDOWS) <[email protected]>
Co-authored-by: PRMerger5 <[email protected]>
Co-authored-by: Mike Battista <[email protected]>
Co-authored-by: PRMerger9 <[email protected]>
Co-authored-by: PRMerger Service account 2 <[email protected]>
Co-authored-by: Ming Ho <[email protected]>
Co-authored-by: Gabby Bilka <[email protected]>
Co-authored-by: Vaheeshta Mehrshahi <[email protected]>
Co-authored-by: Drew Batchelor (he/him) <[email protected]>
Co-authored-by: Jeremy Danyow <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/tech Pri1 support-request A support-style question where the customer needs help solving a problem. uwp/prod
Projects
None yet
Development

No branches or pull requests

3 participants