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

"error C2039: 'back_inserter': is not a member of 'std'" when building #207

Closed
ahmedalnuaimi opened this issue May 19, 2020 · 3 comments
Closed
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@ahmedalnuaimi
Copy link

Brief description of your issue

Cannot build all the projects

Steps to reproduce

1- Clone the repo
2- Open the solution in Visual Studio
3- Build for Release/x64

Expected behavior

All the projects should be built.

Actual behavior

Compilation Errors:

Errors:
1>------ Build started: Project: AppInstallerCommonCore, Configuration: Release x64 ------
1>pch.cpp
1>D:\cpp\winget-cli\src\AppInstallerCommonCore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(1246,50): error C2039: 'back_inserter': is not a member of 'std'
1>D:\cpp\winget-cli\src\AppInstallerCommonCore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(692): message : see declaration of 'std'
1>D:\cpp\winget-cli\src\AppInstallerCommonCore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(1246,50): message : This diagnostic occurred in the compiler generated function 'void winrt::vector_base<D,T>::assign(InputIt,InputIt)'
1>D:\cpp\winget-cli\src\AppInstallerCommonCore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(1252): message : see reference to class template instantiation 'winrt::vector_base<D,T>' being compiled
1>D:\cpp\winget-cli\src\AppInstallerCommonCore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(2618,63): error C2039: 'back_inserter': is not a member of 'std'
1>D:\cpp\winget-cli\src\AppInstallerCommonCore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(692): message : see declaration of 'std'
1>D:\cpp\winget-cli\src\AppInstallerCommonCore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(2701): message : see reference to class template instantiation 'winrt::impl::convertible_observable_vector<T,Container>' being compiled
1>Done building project "AppInstallerCommonCore.vcxproj" -- FAILED.
2>------ Build started: Project: AppInstallerCLICore, Configuration: Release x64 ------
2>pch.cpp
2>D:\cpp\winget-cli\src\AppInstallerCLICore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(1246,50): error C2039: 'back_inserter': is not a member of 'std'
2>D:\cpp\winget-cli\src\AppInstallerCLICore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(692): message : see declaration of 'std'
2>D:\cpp\winget-cli\src\AppInstallerCLICore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(1246,50): message : This diagnostic occurred in the compiler generated function 'void winrt::vector_base<D,T>::assign(InputIt,InputIt)'
2>D:\cpp\winget-cli\src\AppInstallerCLICore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(1252): message : see reference to class template instantiation 'winrt::vector_base<D,T>' being compiled
2>D:\cpp\winget-cli\src\AppInstallerCLICore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(2618,63): error C2039: 'back_inserter': is not a member of 'std'
2>D:\cpp\winget-cli\src\AppInstallerCLICore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(692): message : see declaration of 'std'
2>D:\cpp\winget-cli\src\AppInstallerCLICore\x64\Release\Generated Files\winrt\Windows.Foundation.Collections.h(2701): message : see reference to class template instantiation 'winrt::impl::convertible_observable_vector<T,Container>' being compiled
2>Done building project "AppInstallerCLICore.vcxproj" -- FAILED.
3>------ Build started: Project: AppInstallerCLI, Configuration: Release x64 ------
3>LINK : fatal error LNK1181: cannot open input file 'D:\cpp\winget-cli\src\x64\Release\AppInstallerCommonCore\AppInstallerCommonCore.lib'
3>Done building project "AppInstallerCLI.vcxproj" -- FAILED.
4>------ Build started: Project: AppInstallerCLIPackage, Configuration: Release x64 ------
4>LINK : fatal error LNK1181: cannot open input file 'D:\cpp\winget-cli\src\x64\Release\AppInstallerCommonCore\AppInstallerCommonCore.lib'
4>Done building project "AppInstallerCLI.vcxproj" -- FAILED.
========== Build: 0 succeeded, 4 failed, 2 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

Environment

Windows SDK: 10.0.18362.0
Visual Studio: Microsoft Visual Studio Enterprise 2019 Preview Version 16.7.0 Preview 1.0
Platform Toolset: Visual Studio 2019 (v142)
Windows Version: 2004 (19628.1)

@JohnMcPMS JohnMcPMS added the Issue-Bug It either shouldn't be doing this or needs an investigation. label May 20, 2020
@JohnMcPMS
Copy link
Member

This is very odd, no idea why its happening. The only thing that comes to mind is updating our C++/WinRT reference.

@denelon denelon added this to the Package Manager Backlog milestone May 23, 2020
@denelon
Copy link
Contributor

denelon commented Apr 20, 2021

@ahmedalnuaimi are you still having problems building this project?

@denelon denelon added the Needs-Author-Feedback Issue needs attention from issue or PR author label Apr 20, 2021
@ahmedalnuaimi
Copy link
Author

@ahmedalnuaimi are you still having problems building this project?

I've just tested the master branch with the latest Visual Studio 2019 Preview version and it worked!

@ghost ghost added Needs-Attention Issue needs attention from Microsoft and removed Needs-Author-Feedback Issue needs attention from issue or PR author labels Apr 20, 2021
@denelon denelon modified the milestones: Backlog - Windows Package Manager, v1.0 - Windows Package Manager May 4, 2021
@denelon denelon removed the Needs-Attention Issue needs attention from Microsoft label Jul 29, 2024
nidietr-MSFT added a commit to nidietr-MSFT/winget-cli that referenced this issue Dec 6, 2024
44d81dc8 Using early-return in UrlBuilder::GetQuery()
9e9b27e3 Fixing "Use of string after lifetime ends"
21bf6b98 Adding functional proxy tests
46388eaa Adding a ProxyServer implementation
7a0bfbec Exposing Path and Query via UrlBuilder
b2014df3 Adding unit tests for proxy validation
cdd840b0 Adding proxy input string support
216210ab Adding required permissions to enable uploading of CodeQL results (microsoft#214)
fb953d6e Bump github/codeql-action from 2 to 3 (microsoft#215)
52af7124 Enabling CodeQL scanning (microsoft#211)
e555d764 Bump clang-format from 18.1.5 to 19.1.1 (microsoft#210)
ab8f0e72 Setup: improving build tools installation (microsoft#207)

git-subtree-dir: src/SfsClient/sfs-client
git-subtree-split: 44d81dc8e7614c0be8777db22431e5065aa7a6b8
nidietr-MSFT added a commit to nidietr-MSFT/winget-cli that referenced this issue Dec 6, 2024
c639a506 Adding support for a custom proxy input (microsoft#218)
258d189b Improve logging when the content type is wrong (microsoft#221)
216210ab Adding required permissions to enable uploading of CodeQL results (microsoft#214)
fb953d6e Bump github/codeql-action from 2 to 3 (microsoft#215)
52af7124 Enabling CodeQL scanning (microsoft#211)
e555d764 Bump clang-format from 18.1.5 to 19.1.1 (microsoft#210)
ab8f0e72 Setup: improving build tools installation (microsoft#207)

git-subtree-dir: src/SfsClient/sfs-client
git-subtree-split: c639a506e712dbd29ca7ca0c78d5216658e78748
nidietr-MSFT added a commit to nidietr-MSFT/winget-cli that referenced this issue Dec 10, 2024
0e27525d Bumping version to 1.1.0 (microsoft#222)
c639a506 Adding support for a custom proxy input (microsoft#218)
258d189b Improve logging when the content type is wrong (microsoft#221)
216210ab Adding required permissions to enable uploading of CodeQL results (microsoft#214)
fb953d6e Bump github/codeql-action from 2 to 3 (microsoft#215)
52af7124 Enabling CodeQL scanning (microsoft#211)
e555d764 Bump clang-format from 18.1.5 to 19.1.1 (microsoft#210)
ab8f0e72 Setup: improving build tools installation (microsoft#207)

git-subtree-dir: src/SfsClient/sfs-client
git-subtree-split: 0e27525d597c730e71646fd0b15bdc8c8503f24d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

3 participants