Xojo example project
This example project shows how you can build the OpenSSL Library from Source as a Universal .dylib
(arm64 and x86_64), include it in a Xojo project - and finally use it in your application.
Included in this repository:
- How to: Build OpenSSL on macOS
- A Shell Script you can use as a template to build the OpenSSL Library yourself
- Example Xojo Project - showing how to bundle your own built
.dylib
's in your application
Using OpenSSL 3.0.x in a Xojo built application
Xojo is a rapid application development for Desktop, Web, Mobile & Raspberry Pi.
The Desktop application Xojo example project openssl-byo.xojo_project
is using:
- Xojo 2024r1.1
- API 2
- Open the example project
openssl-byo.xojo_project
, create a new project - or open your existing project - In the Navigator, go to:
Build Settings -> macOS
- Add a
Post Build Step: Copy Files
- Drag in the two built .dylibs:
libssl.3.dylib
andlibcrypto.3.dylib
- Set the Post Build Script behavior in the Inspector:
- Applies to:
both
- Subdirectory:
(empty)
- Destination:
Framework folder
- Applies to:
You then can use the bundled OpenSSL Library that you have just built in your own project.
For example: Get the OpenSSL Version like this:
Const cryptoLib = "@executable_path/../Frameworks/libcrypto.3.dylib"
Declare Function OpenSSL_version Lib cryptoLib (i As Integer) As CString
SomeLabel.Text = OpenSSL_version(0)
Juerg Otter is a long term user of Xojo and working for CM Informatik AG. Their Application CMI LehrerOffice is a Xojo Design Award Winner 2018. In his leisure time Juerg provides some bits and pieces for Xojo Developers.
Do you like this project? Does it help you? Has it saved you time and money?
You're welcome - it's free... If you want to say thanks I'd appreciate a message or a small donation via PayPal.