I am writing both a software to have windows and mac version. The program need ssl socket communication. How I can create a openssl shared library between mac and windows. And make the program can run in a machine which doesn't have openssl install on it
You need to compile openssl library both on Mac and Windows, and link the static library (.lib for Windows and .a for Mac) into your executable respectively.
Related
How to use abax library in mac os?
https://github.com/exeray/abaxenabler
after installing library it said no such files.
Qt requires open ssl libraries to be installed on system. In debian / ubuntu when I install open ssl using apt everything works. But when I compile my application in windows, SSL features are not available I can verify this by executing
QSslSocket::supportsSsl()
How do I make it work in windows? I downloaded and installed open ssl from http://www.slproweb.com/products/Win32OpenSSL.html but it still returns false.
So after long time I figured what the problem is:
These 2 libraries need to be in same folder as your executable OR in windows system folder (system32 I think):
libeay32.dll
ssleay32.dll
You will find them in \bin of your OpenSSL folder, since I copied these 2 libs there it works
IMPORTANT: When deploying to client computers, it's also necessary to install vcredist package that was used to compile these .dll which may differ from vcredist package needed to run the application itself. vcredist version depends on version of the libraries.
You have to add OpenSSL lib in your project. In windows Qt doesn't come with OpenSSL lib. (I think it's a legal issue). You can find OpenSSL developer libs in URI you posted. If you are compiling against 32bit framework, what you need to download is Win32 OpenSSL v1.0.1e
This is what I have in my project.
QT += core gui network
win32{
LIBS += -LC:/OpenSSL-Win32/lib -lubsec
INCLUDEPATH += C:/OpenSSL-Win32/include
}
As you figured out already, you were missing dlls. Here is more information
Check what version of ssl you need with
QSslSocket::sslLibraryBuildVersionString();
For ssl 1.0.x (qt<5.12.4) you are likely missing libeay32.dll and ssleay32.dll.
For ssl 1.1.x (qt>=5.12.4) binary compatibility broke (qt 5.12.4 released), so you might need libssl-1_1.dll and libcrypto-1_1.dll, and its dependencies capi.dll and dasync.dll.
If I'm compiling a Windows application on Linux using MinGW, do I link the Linux openal and opengl libraries or are there separate ones that come with MinGW? If so, where are they located?
I have written a code that runs successfully on a ubuntu machine having Qt installed but when I'm trying to run the executable on another ubuntu machine that don't have Qt I am getting this error:
error while loading shared libraries: libQt5Widgets.so.5
Since you have a shared build, you need the required shared Qt libraries on your system.
Alternatively if you want to build a standalone executable then you will have to compile it statically.
Following link maybe helpful:
How to make binary distribution of Qt application for Linux
As is clear, the required Qt libraries are not installed on the other machine, you will need to install Qt libraries first.
The standard procedure followed on Linux, is to create a package (Debian, rpm, pacman etc.) Since you are using Ubuntu, you should create a Debian package with libqt5gui5 mentioned as dependency, so when you install the package, Qt libraries are automatically downloaded and installed if necessary.
The Gentoo Linux distribution has a version that works on Interix x86 Windows. If I build C++ libraries using gcc, will these libraries work with an executable not built inside Gentoo, but only inside Interix? Do I create a dependency on any Gentoo install for runtime or is Interix the only dependency of such libraries and thus its use at compile time does not create a runtime dependency?