Build unqlite for Windows Phone 8.1 Store Apps (WinRT) - c++

We are developing a C++ core for our mobile app. We would use unqlite DB. We compiled it successfully for iOS and for Android.
http://unqlite.org/downloads.html
When we try to compile it for WinRT, we receive a lot of errors. There is someone who has compiled it for WinRT?
Theoretically Windows Phone is supported (http://www.developereconomics.com/five-popular-databases-for-mobile/).
Thanks

As I know, if you have some C++ Library and want to use in Windows Phone Project you need:
Create Windows Runtime Component (C++ project)
Include your C++ Library into Windows Runtime Component
Establish bridge between your C++ Library and Windows Phone Project
You cannot include an usual C++ Library in Windows Phone (Store) project

Related

Build UWP apps using Ninja?

Can we use ninja to build UWP apps and hence create the appx package for the same?
I don't feel there is an online article for the same. I know how to do it using VS and Make.
In theory: Yes
Notable one thing: Ninja just official support C++, I can't find any result Ninja support other programming languages
With C++ we have 2 options:
C++/CX: You should activate flag /ZW for Windows Metadata
C++/WinRT: With WinRT you just compile without any restrict, this doesn't need Windows Metadata anymore
C++/CX: we have long story behind Windows Runtime development before C++ 11/14 became official so Microsoft add their own implementation features to MSVC. So with C++/CX you can compile with very old SDK like 10240, 10586, ... and in theory it also work with Windows 8.0/8.1 SDK, Windows Phone 8.0/8.1 SDK. Another attemp try to compile UWP with C++/CX on FastBuild (system build like Ninja) is successful, you can read as a reference here: https://github.com/fastbuild/fastbuild/issues/623
C++/WinRT is reunion attempt make Windows Runtime back to standard C++ 17. C++/WinRT can also compile with Clang/GCC. Base on answer from Kenny Kerr (creator of C++/WinRT): C++/WinRT is not limit with old SDK, but he recommended to use newer SDK like 17134. Link his answer https://stackoverflow.com/a/53193711/8707331.
Some useful links for C++ UWP:
https://github.com/MicrosoftDocs/cpp-docs/blob/master/docs/porting/how-to-use-existing-cpp-code-in-a-universal-windows-platform-app.md
https://modernwindows.wordpress.com/2015/05/28/modern-c-and-clang/
you can create uwp apps in following ways:
c# and xaml
web technologies like html, css and js. and you can use any
third party js libraries with it. you can even use hosted web apps
as uwp apps or latest technologies like pwas can also be shipped as
uwp apps. more here : https://developer.microsoft.com/en-us/windows/pwa
c++ and xaml : with this approach you can use c++ libraries (if they comply by uwp platform) the reason you do not have much support online for this is because majority of uwp developers use c# and xaml approach.
There are some work around for that, and one of them is to create a Desktop app and then package that in MSIX packaging , which packages a windows Desktop app into a uwp app and you can even distribute it through Microsoft store.
CMake can't be used to generate UWP package. However, you could use make.exe or Visual Studio to generate UWP package. For more you could refer to Create an app package with the MakeAppx.exe tool and Package a UWP app with Visual Studio.

Common SDL project for Visual C++ cross platform development

I'm attempting to use Visual C++ cross platform features to write an SDL 2 app for Windows, Windows Universal, iOS, Android and Linux. I have one project for each platform now I want to abstract the SDL stuff to a common project that each platform project will reference with each project supplying the appropriate SDL libs for the platform through the linker.
Is there a project type in VS that actually allows me to do this? I was hoping the shared items project would do the trick, but I doubt thats the one. There does appear to be some form of shared library for iOS and Android, but it doesn't look like that extends to Linux and Win32.
Thanks,
To make a successful cross-platform application with SDL2, you should, in first place, use a compiler that's available on both platform. Because, you will need to compile a binary for each platform. SDL2 seems to support IOS and Android out of the box, but I don't know how deployment is done for the mobile OS. You can still use Visual Studio with CMake or a Makefile and use another compiler instead of Visual C++ to support a cross-platform build, like g++ (mingw32 on windows) or Clang.

Running .net based exe application without .NET Framework

I just created a clr c++ aplication that combine c++ code and windows form
as resoalt the exe prodused from visual studio cannot use /mt and its not standalone (it require the wright .net installed on the computer)
are there ANY way to make a fully standalone exe from clr c++ exe?
i tried to check out spoon studio and Cameyo but it's look like they work only on files that includes instalation ...
The point is what a standalone application would buy you here? There is no such thing as a "standalone application" anyway - depending on how hard you look at it. You'll always have dependencies at least on the Windows version you intent your application to run on.
In the end it boils down to deployment or distribution issues. If you don't want your users to install a (newer) version of the .NET framework just to run your application, then start by determining the lowest Windows version you want to support with your application. Then check here for the .NET version that comes preinstalled with that version of windows. Then target your application against that version of .NET.

Convert a Windows Phone 8.1 project into a Portable Library

I haven't been able to find any information on this issue:
I have a C++ Windows Phone 8.1 library project, I would like to convert it into a portable library without having to recreate the project and set all parameters.
I guess it should be possible to do it by editing the vcxproj file, but I don't know how to modify it to make it work.
I meet several issues:
What is the equivalent of Portable Library (C#) for C++?
How to change an existing Windows Phone 8.1 C++ project into this equivalent?
Thanks :)
In general, Windows Phone 8.x doesn't support sharing of binaries with Windows desktop because the import libraries are different between the two (eg, desktop apps link against kernel32.dll but that DLL doesn't exist on Windows Phone). You could share between Windows Phone 8.0 and 8.1 though (provided you only used features available in 8.0).
In theory you might be able to make a static lib that was shared if it didn't depend on any Windows APIs, but it's not really supported. You could try creating a new Static Library project and diffing it against your current project to see what settings have changed.
This changes in Windows 10, where shared binaries are fully supported (obviously you still need ARM vs x86 vs x64 builds depending on CPU architecture).
According to Maximize code reuse between Windows Phone 8 and Windows 8 C++ is not supported as PCL language as this is a .net framework technology.
Note that Portable Class Libraries are a .NET Framework concept and don’t support C++
I also looked into Visual Studio to confirm that and couldn't find a template.

Default smart device project can't find dependencies

When running the default c++ project in Visual Studios for a Windows CE 5.0 device, I get an error complaining about missing resources. Depends says that my executable needs ayghsell.dll (the Windows Mobile shell), and CoreDll.dll. Does this mean that my executable can only be run on Windows Mobile devices, instead of any generic Windows CE installation? If that's the case, how do I create an executable targeting generic WinCE?
Depends what you mean by a generic Windows CE installation. Windows CE itself is a modularised operating system, so different devices can have different modules included. Therefore each Windows CE device can have a radically different OS installed (headless even).
Coredll is the standard "common" library that gets included in a Windows CE installation, however it can contain different components depending on the other modules in the system.
If you want to target a relatively standard version of Windows CE either target the Standard SDK set of components, or go for a Windows Mobile platform.
If you have an SDK then install and use that. If none is available then you can generate an SDK using Platform Builder and the OS project files.
To get your application to work on a non-Windows Mobile installation of Windows CE you just have to remove the code that uses the aygshell library, and not link to those libraries.