liblec core library
The leccore is designed for the rapid development of modern, efficient and easy to maintain C++ applications. It is part of the liblec libraries. It is built to contain the most fundamental building blocks like databases, file handling, application updates, registry settings, and other general helper utilities specially designed to make building robust, sophisticated applications a breeze. Furthermore, it is designed to bind together all the other liblec libraries like lecui and lecnet.
The following classes have been added to the library
Class Name | Description | Interface |
---|---|---|
database::connection | Database connection | #include <liblec/leccore/database.h> |
file | File handling helper | #include <liblec/leccore/file.h> |
pc_info | PC hardware information | #include <liblec/leccore/pc_info.h> |
hash | Cryptographic hash | #include <liblec/leccore/hash.h> |
encode::base32 | Base32 character encoding | #include <liblec/leccore/encode.h> |
encode::base64 | Base64 character encoding | #include <liblec/leccore/encode.h> |
app_version_info | Application version information | #include <liblec/leccore/app_version_info.h> |
registry | Registry reading and writing | #include <liblec/leccore/registry.h> |
encrypt | Encryption | #include <liblec/leccore/encrypt.h> |
settings | Application settings | #include <liblec/leccore/settings.h> |
check_update | Checking for app updates | #include <liblec/leccore/web_update.h> |
download_update | Downloading app updates | #include <liblec/leccore/web_update.h> |
zip | Zipping to a zip archive | #include <liblec/leccore/zip.h> |
unzip | Unzipping a zip archive | #include <liblec/leccore/zip.h> |
user_folder | Getting the path to known user folders | #include <liblec/leccore/system.h> |
commandline_arguments | Parsing command line arguments | #include <liblec/leccore/system.h> |
shell | Shell helper class | #include <liblec/leccore/system.h> |
clipboard | Clipboard class | #include <liblec/leccore/system.h> |
image | Image class | #include <liblec/leccore/image.h> |
The library is used in the pc_info and collab apps.
Prebuilt binaries of the library can be found under releases.
The library has the following compile-time dependencies:
- boost C++ libraries
- assumes boost 1.72 prebuilt binaries are in C:\local\libs\boost_1_72_0
- download prebuilt boost binaries here
- For example, the binaries for boost 1.72 are here
- For Microsoft Visual Studio 2019 you can download the file boost_1_72_0-msvc-14.2-64.exe (64 bit) and boost_1_72_0-msvc-14.2-32.exe (32 bit).
- sqlcipher
- assumes sqlcipher prebuilt binaries are in C:\local\libs\sqlcipher
- you can use the pre-compiled files here
- crypto++
- assumes crypto++ prebuilt static library files are in C:\local\libs\cryptopp
- you can use the pre-compiled files here
- poco
- assumes poco prebuild static library files are in C:\local\libs\poco
- you can use the pre-compiled files here
If the boost, sqlcipher and/or crypto++ libraries are installed elsewhere you will need to change the Microsoft Visual Studio project properties under Properties - C/C++ - General - Additional Include Directories and also under Properties - Linker - General - Additional Library Directories.
- sqlcipher
- openssl
You can use the pre-compiled files for both from here.
Create a folder '\liblec' and clone the repository into it such that it resides in 'liblec\leccore'. Open the Microsoft Visual Studio Solution file liblec\leccore\leccore.sln. Select Build -> Batch Build, then select the desired configurations of the given four:
- Debug x86
- Relese x86 (32 bit Release Build)
- Debug x64
- Release x64 (64 bit Release Build)
Build.
Three folders will be created in the \liblec directory, namely bin, lib and include. Below is a description of these subdirectories.
- bin - contains the binary files. The following files will be created:
File | Description |
---|---|
leccore32.dll | 32 bit release build |
leccore64.dll | 64 bit release build |
leccore32d.dll | 32 bit debug build |
leccore64d.dll | 64 bit debug build |
- lib - contains the static library files that accompany the dlls. The files are named after the respective dlls.
- include - contains the include files
Open your project's properties and for All Configurations and All Platforms set the following:
- C/C++ -> General -> Additional Include Directories -> Edit -> New Line ... add \liblec\include
- Linker -> General -> Additional Library Directories -> Edit -> New Line ... add \liblec\lib
- Debugging -> Environment -> Edit ... add PATH=\liblec\bin;PATH%
Now you can use the required functions by calling #include <liblec/leccore/...>
Build.
If it's the 32 bit build you will need to deploy it with leccore32.dll, sqlcipher32.dll and libeay32.dll in the same folder. If it's a 64 bit build use leccore64.dll, sqlcipher64.dll and libeay64.dll.