The situation is this: I have a shared (DLL) build of Qt 4.5.1 and some reasons given by the project lead, I have to convert to Qt 4.5.2 static. I am using the Qt Visual Studio plug-in to manage my project.
1) Would DLLs (Qwt 5.2 and other Qt solutions) compiled with the shared Qt 4.5.1 work with an EXE compiled with static Qt 4.5.2, or do I have to re-complie all those third party DLLs?
2) Is it possible to compile a DLL from a static build?
3) Are there any additional dependencies for a static build of an existing Qt 4.5 solution?
We compile our app ->debug as dynamic and ->release as static in order to prevent users from dll hell in Windows and using one file only.
1) We compiled both versions of all libraries. As release=static and debug=dynamic, like our own app.
2) Not that I can imagine.
3) Not that I can imagine.
Related
I am able to use OpenSSL static libraries (libcrypto.a and libssl.a) in my iOS app thanks to this help. Now i can also use OpenSSL dynamic libraries (libcrypto.so and libssl.so) in my Android app version thanks to this info. I downloaded the files for Android in the OpenSSL_1.0.2g_Android.zip file from here. I just guessed and used the ARM files (armeabi-v7a folder) instead of the Intel files (x86 folder) and it worked on my Android test phone.
My question: How do I make an Android build that uses the correct library files on ARM devices AND also on Intel? I don't know how to deploy both sets of files for this. Below is snip of project window showing where i test added the second libcrytpo.so library file for x86.
But, this second libcrypto.so does not show up in the deployment window, only the first version i added (the ARM version) remains.
I was hoping i could somehow use compiler directives but maybe i just need 2 independent projects altogether? One built for Android ARM and other for Android x86? Further, all i'm needing in my code is an IdHTTP1->Get() so maybe their is a way i can use the built in BoringSSL fork? If so, how?
russ
C++Builder 10.3 Version 26.0.33219.4899
RAD Studio does not support producing Android apps for Intel, only for ARM, so don't even worry about trying to use the x86 libs on Android.
Also, Indy does not support BoringSSL at this time.
I selected a Non-Qt C++ project from File->New, and then CMake for the build system, yet Qt Creator still insists that I specify a Qt kit.
I know for qmake projects you need a kit for the qmake, but why does it need it for cmake? The project itself won't use qt or qmake, I just want to use Qt Creator as the IDE. Also would specifying a kit make a dependency on Qt?
You are free to have kits in Qt Creator with or without Qt, with or without a C++ compiler, with or without cmake binaries, etc.
Qt Creator uses kits as a collection of things that are used together in (multiple) projects, so that you do not have to define these same settings again and again. The settings available in a kit depend on the plugins you have enabled and Creator is perfectly happy if some information is not set -- as long as this information is not needed by the project you are working on. So if you open a qmake-based project, creator will complain if a kit has no Qt version set (which is what provides the qmake binary). If you try to open a cmake-based project, then Creator will complain about Kits without a cmake binary set up. Kits are in no way limited to qmake projects, but does also apply to cmake, autotools, nim, python projects (and whatever else is supported;-).
For CMake projects the Kit defines the cmake binary to use, the Generator to use with that binary, default values to pass to cmake, the compiler used by the code model built into Qt Creator (and by the cmake project itself in newer Qt Creator versions), the Qt version that is used by the code model (and by the cmake project in newer QtC versions), the default environment the project will see when building and some more things.
I'd like to build a PCL library, starting from an existing C++ code. This code has some dependencies (SDL, which is available as a NuGet package) and I'd like to know if it's feasible to integrate it in a Xamarin solution (which targets Xamarin.iOS, Xamarin.Android and Xamarin.Mac).
More precisely, the code is hosted here : https://github.com/chunying/gaminganywhere/tree/master/ga/client
If so, do I need to use C++/CX language ?
I'm trying to understand why I'm getting the following errors when running tests in Xamarin Studio 5.9.1 (build 3) on OS X.
System.IO.FileNotFoundException : Could not load file or assembly 'System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
System.TypeLoadException : A type load exception has occurred.
All projects build successfully and the same tests run just fine in Visual Studio on Windows using the same solution.
I am seeing a warning when building the test project on OS X, despite having already installed and added the reference.
All projects referencing MyProject.fsproj must install nuget package Microsoft.Bcl.Build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317569.
I still don't know why Xamarin behaves differently than Visual Studio, but the root cause was that the test project was targeting .Net 4.5 whereas the main project was targeting .Net 4.0
Thanks to #7sharp9 for the help.
Different platforms (Android, iOS, Desktop) have different System.Net.Http.dll binaries - compiled from the same source, but each version references the mscorlib.dll (and other base-class libraries) from the platform it was built against.
This is not a problem when you use it in an application - Xamarin Studio will automatically pick the right version for you - but you can't use it in a Portable Class Library.
Microsoft initially implemented HttpClient as part of .NET 4.5, but then released a portable version of it (with a Windows-only license). If I understand this correctly, then that's mostly the same API as in .NET 4.5 plus a few minor additions (I think they added gzip compression, which Mono's version currently doesn't).
For Xamarin / Mono, all we need to do to create an open-source version of this library is to take our existing sources and compile them against the portable profile. I haven't tried this yet, but this could be as easy as editing the .csproj file and replacing the .
Also would suggest that you install HttpClient NuGet package
System.Net.Http.HttpClient is available directly from the latest version of Xamarin.
Simply check for updates from Xamarin Studio ;-)
Mono for Android has access to most of .NET 4.0 from the Mono framework. Unfortunately, when I try to add NuGet packages in Visual Studio that specifically target .NET 3.5 or beyond, with a /lib/net*/ folder structure, it tosses up an error.
You are trying to install this package into a project that targets
'MonoAndroid,Version=v2.1', but the package does not contain any
assembly references that are compatible with that framework.
If a NuGet package doesn't have the .NET version breakdown, or one where you removed that subdirectory structure and published it to a NuGet source, it works fine. For example, NUnit just has a /lib/ folder with no further breakdown by .NET framework version and installed fine.
It appears NuGet could be checking compatibility by using the <TargetFrameworkVersion> project file XML element. If so, that is the problem as Mono for Android usurps that element to mean a "target Android framework version". For example, to target Android v2.2, it looks like this:
<TargetFrameworkVersion>v2.1</TargetFrameworkVersion>
In the project properties dialog, where the "[.NET] Target framework" drop-down would be is a drop-down for "Minimum Android to target" that affects this XML element.
If this is the problem NuGet is encountering, I won't be able to use unmodified NuGet for version-specific packages until targeting an Android app for a minimum of Ice Cream Sandwich (v4.0).
Side note
You can reference the DLLs from these packages via project reference. It definitely throws a warning at you, but you can ignore it fairly safely (assuming the assembly doesn't wander too far from the code implemented in Mono).
'Some.dll', or one of its dependencies, requires a later version of
the .NET Framework than the one specified in the project...
No, assemblies must be compiled against the 2.0.5 profile in order to be used by Mono for Android. You can achieve this by using the Mono for Android Class Library template or by using assemblies compiled for Silverlight.
The Android version (2.2, 3.0, 4.0) is not related to the version of the .NET BCL an assembly is compiled against.