cppwinrt | C/WinRT Samples | Runtime Evironment library

 by   kennykerr C++ Version: Current License: MIT

kandi X-RAY | cppwinrt Summary

kandi X-RAY | cppwinrt Summary

cppwinrt is a C++ library typically used in Server, Runtime Evironment applications. cppwinrt has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

C++/WinRT Samples
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              cppwinrt has a low active ecosystem.
              It has 15 star(s) with 2 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              cppwinrt has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of cppwinrt is current.

            kandi-Quality Quality

              cppwinrt has 0 bugs and 0 code smells.

            kandi-Security Security

              cppwinrt has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              cppwinrt code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              cppwinrt is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              cppwinrt releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cppwinrt
            Get all kandi verified functions for this library.

            cppwinrt Key Features

            No Key Features are available at this moment for cppwinrt.

            cppwinrt Examples and Code Snippets

            No Code Snippets are available at this moment for cppwinrt.

            Community Discussions

            QUESTION

            Unable to install pickle5
            Asked 2022-Apr-12 at 10:39
            PS C:\Users\Lenovo> pip install pickle5
            Collecting pickle5
              Using cached pickle5-0.0.11.tar.gz (132 kB)
              Preparing metadata (setup.py) ... done
            Using legacy 'setup.py install' for pickle5, since package 'wheel' is not installed.
            Installing collected packages: pickle5
              Running setup.py install for pickle5 ... error
              error: subprocess-exited-with-error
            
              × Running setup.py install for pickle5 did not run successfully.
              │ exit code: 1
              ╰─> [36 lines of output]
                  running install
                  running build
                  running build_py
                  creating build
                  creating build\lib.win-amd64-3.10
                  creating build\lib.win-amd64-3.10\pickle5
                  copying pickle5\pickle.py -> build\lib.win-amd64-3.10\pickle5
                  copying pickle5\pickletools.py -> build\lib.win-amd64-3.10\pickle5
                  copying pickle5\__init__.py -> build\lib.win-amd64-3.10\pickle5
                  creating build\lib.win-amd64-3.10\pickle5\test
                  copying pickle5\test\pickletester.py -> build\lib.win-amd64-3.10\pickle5\test
                  copying pickle5\test\test_pickle.py -> build\lib.win-amd64-3.10\pickle5\test
                  copying pickle5\test\test_picklebuffer.py -> build\lib.win-amd64-3.10\pickle5\test
                  copying pickle5\test\__init__.py -> build\lib.win-amd64-3.10\pickle5\test
                  running build_ext
                  building 'pickle5._pickle' extension
                  creating build\temp.win-amd64-3.10
                  creating build\temp.win-amd64-3.10\Release
                  creating build\temp.win-amd64-3.10\Release\pickle5
                  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Lenonvo\AppData\Local\Programs\Python\Python310\include -IC:\Users\Lenonvo\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /Tcpickle5/_pickle.c /Fobuild\temp.win-amd64-3.10\Release\pickle5/_pickle.obj
                  _pickle.c
                  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Lenonvo\AppData\Local\Programs\Python\Python310\include -IC:\Users\Lenonvo\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /Tcpickle5/picklebufobject.c /Fobuild\temp.win-amd64-3.10\Release\pickle5/picklebufobject.obj
                  picklebufobject.c
                  pickle5/picklebufobject.c(20): warning C4273: 'PyPickleBuffer_FromObject': inconsistent dll linkage
                  C:\Users\Lenonvo\AppData\Local\Programs\Python\Python310\include\cpython/picklebufobject.h(18): note: see previous definition of 'PyPickleBuffer_FromObject'
                  pickle5/picklebufobject.c(39): warning C4273: 'PyPickleBuffer_GetBuffer': inconsistent dll linkage
                  C:\Users\Lenonvo\AppData\Local\Programs\Python\Python310\include\cpython/picklebufobject.h(22): note: see previous definition of 'PyPickleBuffer_GetBuffer'
                  pickle5/picklebufobject.c(58): warning C4273: 'PyPickleBuffer_Release': inconsistent dll linkage
                  C:\Users\Lenonvo\AppData\Local\Programs\Python\Python310\include\cpython/picklebufobject.h(24): note: see previous definition of 'PyPickleBuffer_Release'
                  pickle5/picklebufobject.c(208): warning C4273: 'PyPickleBuffer_Type': inconsistent dll linkage
                  C:\Users\Lenonvo\AppData\Local\Programs\Python\Python310\include\cpython/picklebufobject.h(13): note: see previous definition of 'PyPickleBuffer_Type'
                  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\Lenonvo\AppData\Local\Programs\Python\Python310\libs /LIBPATH:C:\Users\Lenonvo\AppData\Local\Programs\Python\Python310\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64 /EXPORT:PyInit__pickle build\temp.win-amd64-3.10\Release\pickle5/_pickle.obj build\temp.win-amd64-3.10\Release\pickle5/picklebufobject.obj /OUT:build\lib.win-amd64-3.10\pickle5\_pickle.cp310-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.10\Release\pickle5\_pickle.cp310-win_amd64.lib
                  python310.lib(python310.dll) : error LNK2005: PyPickleBuffer_GetBuffer already defined in picklebufobject.obj
                     Creating library build\temp.win-amd64-3.10\Release\pickle5\_pickle.cp310-win_amd64.lib and object build\temp.win-amd64-3.10\Release\pickle5\_pickle.cp310-win_amd64.exp
                  build\lib.win-amd64-3.10\pickle5\_pickle.cp310-win_amd64.pyd : fatal error LNK1169: one or more multiply defined symbols found
                  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1169
                  [end of output]
            
              note: This error originates from a subprocess, and is likely not a problem with pip.
            error: legacy-install-failure
            
            × Encountered error while trying to install package.
            ╰─> pickle5
            
            note: This is an issue with the package mentioned above, not pip.
            hint: See above for output from the failure.
            
            ...

            ANSWER

            Answered 2022-Apr-11 at 12:19

            You only need pickle5, a module backporting Pickle protocol 5 features to older Pythons when running on Python versions older than 3.8.

            As evident from Python310 and -3.10 in the output, you're on Python 3.10. You don't need pickle5.

            Thus, the answer to "what should you do", without us not knowing more details about your situation, is "not try to install pickle5".

            Source https://stackoverflow.com/questions/71827522

            QUESTION

            Cannot install pyhash -- syntax error in fnv.h
            Asked 2022-Mar-31 at 00:40

            I am trying to install pyhash with pip. On Ubuntu 20.04.3 with Python 3.8 I was able to install after changing setuptools to 57.5.0 (python -m pip install 'setuptools~=57.5.0')

            But on Windows 10 and Python 3.10 I get a compilation error. There are multiple questions here on SO about installing pyhash; based on this answer I made the following changes:

            • python -m pip install 'setuptools~=57.5.0'
            • $env:PYTHON_HOME='C:\Users\I063510\AppData\Local\Programs\Python\Python310'
            • pip install wheel
            • From Microsoft Build Tools install "Desktop development with C++"

            Now I get warning and errors as follows (complete output at the bottom):

            C:\Users\USERID\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\lib2to3_ex.py:36: SetuptoolsDeprecationWarning: 2to3 support is deprecated. If the project still requires Python 2 support, please migrate to a single-codebase solution or employ an independent conversion process.

            I don't care about Python 2 so this in not an issue, but I don't know how to disable it.

            This error aborts the installation:

            ...

            ANSWER

            Answered 2022-Mar-31 at 00:40

            Try installing it from the Git repository. There are some fixes there that are not released on PyPI yet.

            Source https://stackoverflow.com/questions/71653973

            QUESTION

            How cppwinrt.exe tool know which C++ version to use to generate the headers from .winmd files?
            Asked 2022-Mar-23 at 07:45

            I don't see any switch to specify the "C++ version" in the cppwinrt.exe tool !

            (my fundamental assumption is cppwinrt.exe tool binds the C++ 17 syntax to the ABI, I can't figure out how it can bind C++ 20 or future newer versions syntax )

            Similarly, the cswinrt.exe tool from C#/WinRT projection generates .cs files from .winmd files. The same question applies , How does the cswinrt.exe tool know which "C# version" to use to generate the .cs files ?

            I don't see any switch to specify the "C# version" in the cswinrt.exe tool either !

            end goal : is to understand how "language versions" fit in the WinRT language projections

            ...

            ANSWER

            Answered 2022-Mar-23 at 07:45

            The cppwinrt.exe tool doesn't allow you to specify a C++ language standard. It simply defaults to C++17, with the ability to opt-in to newer language features by way of feature test macros.

            The result is that the generated header files can be compiled with any C++17 compiler, or a compiler that supports a later language version.

            At this time (C++/WinRT version 2.0.210922.5) there are four C++20 features in use:

            • C++20 coroutines, guarded by an #ifdef __cpp_lib_coroutine directive (though that is really just deciding on whether to include the coroutine header file from the experimental/ directory or not; coroutines have been supported since VS 2015).
            • C++20 modules. This isn't guarded as clients need to explicitly opt-in to using winrt.ixx through an import declaration.
            • Support for C++20 ranges (introduced in 2.0.210329.4). This is an interesting one in that none of the code changes require a C++20 compiler. The feature simply lights up for clients using a C++20 compiler when they use the standard library header.
            • C++20 std::format (introduced in 2.0.210922.5), guarded by an #ifdef __cpp_lib_format directive.

            At a fundamental level, C++/WinRT is just a C++ library. As such it can employ any technique that's suitable to providing language-adaptive implementations.

            I don't know how C#/WinRT operates internally, nor C# for that matter, so I cannot comment on that.

            Source https://stackoverflow.com/questions/71576948

            QUESTION

            Install Odoo Source dependencies on Windows 10 Error
            Asked 2022-Jan-11 at 10:47

            I am trying to install Odoo15 Source dependencies on windows 10. I run pip install -r requirements.txt. Then this error occurs

            ...

            ANSWER

            Answered 2022-Jan-11 at 10:47

            Try using psutil version 5.6.7.

            Source

            Source https://stackoverflow.com/questions/70662044

            QUESTION

            How to map a list of Numpy matrices to a vector of Eigen matrices in Cython
            Asked 2021-Dec-01 at 18:34

            I have a C++ function which I want to run from Python. For this I use Cython. My C++ function relies heavily on Eigen matrices which I map to Python's Numpy matrices using Eigency.

            I cannot get this to work for the case where I have a list of Numpy matrices.

            What does works (mapping a plain Numpy matrix to an Eigen matrix):

            I have a C++ function which in the header (Header.h) looks like:

            ...

            ANSWER

            Answered 2021-Dec-01 at 18:34

            Thanks to @ead I found a solution.

            FlattenedMapWithOrder has implementation so it can be assinged to an Eigen::Matrix. However, std::vector does not have such functionality and since std::vector and std::vector are of a different type, they cannot be assigned to one another. More about this here. The implementation in FlattenedMapWithOrder mentioned above is here.

            To solve this, the function in the C++ code called from Cython need to simply have as input argument the matching type: std::vector. To do this, the C++ code needs to know the definition of type FlattenedMapWithOrder.

            To do this, you need to #include "eigency_cpp.h". Unfortunately, this header is not self contained. Therefore, (credits to @ead) I added these lines:

            Source https://stackoverflow.com/questions/69584633

            QUESTION

            C++ compiler error MDM2009 Duplicate type found processing metadata file referencing 2 Windows Component Libraries that both reference another library
            Asked 2021-Nov-12 at 22:26

            My solution structure looks like this:

            The compiler complains that it finds duplicate types (of every public interface/class) in WCL1.winmd b/c that winmd file already exists in WCL4's bin directory.

            One problem is that I know absolutely nothing about C++ and the link offered in the Answer to this question provides a C++ workaround that doesn't help (it's literally like reading a different-but-related language -- i.e. reading German when I only know English).

            I also found this which provides another workaround but doesn't tell you where to put it. I added the specified ItemGroupDescription element into every .csproj file as well as the application's PropertySheet.props file to no avail.

            I have also done the following:

            • Moved the code from WCL2 into WCL3 and removed WCL2 from the solution.
            • Had the application reference WCL1, WCL3 and WCL4.

            Anyone else got any ideas? It would be greatly appreciated....

            UPDATE:

            Here's a link to a small solution that reproduces the compile errors. It seems that it comes from the Microsoft.Windows.CppWinRT NuGet package referenced by the C++ Application. That package auto-generates C++ header files from the .winmd files generated by the component projects referenced by the Application.

            ...

            ANSWER

            Answered 2021-Nov-12 at 22:26

            Well....it's not perfect but this is how I got around the problem...Add the following line to each ProjectReference in each Component .csproj file:

            I'm not sure what the intention of this particular Xml element was, but by setting Private=false, the compiler doesn't copy the InterfaceDefinitionComponent.winmd file into the other Components' bin directory which prevents the C++ compiler from seeing duplicate .winmd files and blowing up because it's trying to generate multiple identical C++ header files for the same Type.

            Source https://stackoverflow.com/questions/69922229

            QUESTION

            Can't Install Taurus on Windows 10 with Python 3.10.0
            Asked 2021-Nov-02 at 10:59

            Can't Install Taurus on Windows 10 with Python 3.10.0.

            Following Prerequisites are installed

            • Get Python 3.7+ from http://www.python.org/downloads and install it, don't forget to enable "Add python.exe to Path" checkbox.
            • Get the latest Java from https://www.java.com/download/ and install it.
            • Get the latest Microsoft Visual C++ and install it. Please check that the 'Desktop Development with C++' box is checked during installation.

            I did run this command and got success python -m pip install --upgrade pip setuptools wheel

            And then I did run this command it was failed and getting this below error message python -m pip install bzt

            ...

            ANSWER

            Answered 2021-Nov-02 at 10:59

            Got it working by c:\temp>pip install lxml-4.6.3-cp310-cp310-win_amd64.whl

            Importantly we need to choose the right version based on your python version.

            My case I have installed 64 bit python 3.10.0

            Downloaded the lxml-4.6.3-cp310-cp310-win_amd64.whl from here http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml and copied the file to c:\temp and then installed with above command.

            Importantly you need to chose this right file for your specific version cp310 here 310 referemce to your python version.

            Source https://stackoverflow.com/questions/69774046

            QUESTION

            ERROR: Command errored out with exit status 1: python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"''
            Asked 2021-Sep-18 at 18:01

            I want to install package PyAudio i have downloaded Microsoft Visual C++ from https://visualstudio.microsoft.com/visual-cpp-build-tools/

            ...

            ANSWER

            Answered 2021-Sep-18 at 18:01

            This has happened to me once when I was making a voice recognition app. What I did was I went to a website with unofficial python binaries but it was a pain. Instead, if you are on a windows system, which you appear to be on, use

            Source https://stackoverflow.com/questions/69235609

            QUESTION

            WinUI 3 Desktop XAML Databinding - WinRT originate error - 0x8001010E when the Property is changed
            Asked 2021-Sep-09 at 18:09

            I am following the BookStore data binding example, documented at XAML controls; bind to a C++/WinRT property, up to and including the "Bind the button to the Title property" section.

            My starting point is a new "Blank App, Packaged (WinUI 3 in Desktop)" project in Visual Studio.

            [EDIT] Starting from a "Blank App (C++/WinRT)" project, which is for UWP apps, works perfectly. The problem persists with "WinUI 3 in Desktop" projects.

            The initial data binding works and the button content L"Atticus" is read from the BookSku title property. However calling MainViewModel().BookSku().Title(L"To Kill a Mockingbird"); in the click handler, as directed in article, throws the exception

            Exception thrown at 0x00007FFC801B4ED9 (KernelBase.dll) in BookStore.exe: WinRT originate error - 0x8001010E : 'The application called an interface that was marshalled for a different thread.'.

            Stepping through the code, the call

            m_propertyChanged(*this, Windows::UI::Xaml::Data::PropertyChangedEventArgs{ L"Title" });

            in void BookSku::Title(hstring const& value) is where the exception is thrown from within.

            I can change the button content manually, not through the binding property.

            The first example in the Data binding in depth article describes a very similar, though slightly less complicated, data binding scenario. It throws the same exception.

            I am using latest Microsoft.Windows.CppWinRT version 2.0.210825.3 and Windows App SDK version 0.8.3

            ...

            ANSWER

            Answered 2021-Sep-09 at 02:42

            The application called an interface that was marshalled for a different thread

            The problem is you update the property in the no-uithread, so it will throw the above exception, you could use the following to go back to ui-thread before updating the property.

            Source https://stackoverflow.com/questions/69110367

            QUESTION

            why lld-link.exe is needed when building Qt 6.1.2 examples?
            Asked 2021-Aug-18 at 09:46

            I am trying to build Qt's analogclock example using MSVC2019 kit, however Qt Creator complains as below. I am curious why lld-link.exe is needed, while I want to use MSVC2019 as compiler.

            What sounds interesting to me is that in Makefile.Debug, CC and CXX is set to clang-cl.

            I might some misunderstanding how MSVC2019 is used by Qt Creator / Qt Examples.

            Any comment is much appreciate it.

            Kit configurations

            Tools > Options > Kit > Kits

            Tools > Options > Kit > Compilers

            Compile Output

            ...

            ANSWER

            Answered 2021-Aug-18 at 02:14

            As per my comment on the question, the Qt Kit auto-detected set up for MSVC2019 seems to use the wrong compiler. Though it's certainly possible to use a LLVM (clang) compiler on Windows, I've personally only done this with "official" LLVM distributions (not whatever is included with MSVC).

            Anyway, one way to resolve this would be to add the correct Kit manually. The simplest way should be (as per screenshots in the question) to:

            1. In the Kit setup, select the existing Desktop Qt6.1.2 MSVC2019 64bit Kit.
            2. Use the Clone button to create a copy of it, then select the copy from the list.
            3. In the copy, just change the two Compiler options to use Microsoft Visual C++ Compiler 16.10.31424.327 (amd64) (it's OK that they both say "C++" in the name even though one of them is for the "C" compiler).
            4. Adjust the kit names so you know which is which in the project settings. Maybe change the broken auto-detected Kit name to include "LLVM" or "broken" or some such to distinguish it. "OK" out of the options dialog.
            5. Now in the Project Build Settings you will be able to select the newly added Kit. Just click on it to enable it. You may also want to disable the broken kit (r-click on the kit name for a menu).

            Keep in mind that Qt 6.1 is not feature complete yet (not everything from 5.x has been ported), though the included examples should work. Upcoming 6.2 release should be more complete, but still breaks lots of 5.x stuff. To try a more mature version with greater backwards compatibility with most existing Qt projects, use 5.12.x or 5.15.x versions.

            Source https://stackoverflow.com/questions/68736699

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install cppwinrt

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/kennykerr/cppwinrt.git

          • CLI

            gh repo clone kennykerr/cppwinrt

          • sshUrl

            git@github.com:kennykerr/cppwinrt.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link