### Building Pubnub C-core with Specific OpenSSL Path Source: https://github.com/pubnub/c-core/blob/master/openssl/README.md Example command using `nmake` with the `uwp.mk` makefile to build the Pubnub C-core library, specifying the installation path of the compiled OpenSSL library via the `OPENSSLPATH` macro. This ensures the build process finds the correct OpenSSL headers and libraries. ```Command Line nmake -f uwp.mk OPENSSLPATH=c:\OpenSSL-Win32 ``` -------------------------------- ### Building OpenSSL for UWP Source: https://github.com/pubnub/c-core/blob/master/openssl/README.md Sequence of command-line commands used to configure, build, test, and install OpenSSL specifically for Universal Windows Platform (UWP) builds using Visual Studio command prompt. Requires running `vcvarsall.bat` first. ```Command Line vcvarsall.bat x86 onecore 10.0.19041.0 ``` ```Command Line nmake clean ``` ```Command Line perl Configure VC-WIN32-ONECORE --prefix=C:\OpenSSL-Win32 --openssldir=C:\SSL no-shared enable-capieng ``` ```Command Line nmake test ``` ```Command Line nmake install_sw ``` -------------------------------- ### Building Pubnub C-core Samples (Windows) Source: https://github.com/pubnub/c-core/blob/master/openssl/README.md Executes the Windows Makefile using 'nmake', specifying the installation path of the OpenSSL library via the 'OPENSSLPATH' macro. Requires MS Visual Studio compilers. ```Makefile nmake -f windows.mk OPENSSLPATH=c:\OpenSSL-Win32 ``` -------------------------------- ### Building Pubnub C-core Samples (POSIX) Source: https://github.com/pubnub/c-core/blob/master/openssl/README.md Executes the POSIX Makefile to build the Pubnub C-core sample programs and static libraries using the default C compiler. Requires an installed OpenSSL package. ```Makefile make -f posix.mk ``` -------------------------------- ### Building Pubnub C-core with Alternative Compiler Source: https://github.com/pubnub/c-core/blob/master/openssl/README.md Example command using `nmake` with the `uwp.mk` makefile to build the Pubnub C-core library, overriding the default compiler (`cl`) with an alternative compiler like `clang-cl` using the `CC` macro. This is useful if you have a compiler that supports MSVC switches. ```Command Line nmake -f uwp.mk CC=clang-cl ``` -------------------------------- ### Specify CMake Build Options for Pubnub C/C++ Source: https://github.com/pubnub/c-core/blob/master/README.md Shows an example of how to pass options to the CMake command line using -D flags to enable specific features like OpenSSL support and examples during the build configuration step. ```sh cmake .. -DOPENSSL=ON -DEXAMPLES=ON ``` -------------------------------- ### Building Pubnub C-core Samples with Clang (POSIX) Source: https://github.com/pubnub/c-core/blob/master/openssl/README.md Executes the POSIX Makefile, explicitly setting the C compiler to 'clang' to build the Pubnub C-core sample programs and static libraries. Requires an installed OpenSSL package and Clang. ```Makefile make -f posix.mk CC=clang ``` -------------------------------- ### Building Pubnub C-core Samples without Proxy (POSIX) Source: https://github.com/pubnub/c-core/blob/master/openssl/README.md Executes the POSIX Makefile, passing the 'USE_PROXY=0' flag to disable the build of components related to proxy support. Requires an installed OpenSSL package. ```Makefile make -f posix.mk USE_PROXY=0 ``` -------------------------------- ### Build with MINGW GCC Make via SH Source: https://github.com/pubnub/c-core/blob/master/windows/README.md Builds Pubnub C-core using make via sh, which might be necessary in some MINGW/Cygwin setups where mingw32-make is not directly on the PATH. ```Shell sh -c "make -f windows-gcc.mk" ``` -------------------------------- ### Set PubNub Origin for Local Docker Development Source: https://github.com/pubnub/c-core/blob/master/CONTRIBUTING.md Sets the PubNub origin URL to "mock_server" when developing locally using Docker. This configures the SDK to connect to the local mock server instance provided by the Docker setup. ```C/C++ pn.set_origin("mock_server"); ``` -------------------------------- ### Compile PubNub C-Core SDK (Custom Options) - Shell Source: https://github.com/pubnub/c-core/blob/master/unreal/README.md Compiles the PubNub C-Core SDK with specific customization flags using CMake. This example enables shared library build and links against a custom OpenSSL location provided by Unreal Engine. ```sh cmake . -DSHARED=ON -DOPENSSL=ON -DOPENSSL_ROOT_DIR={unreal engine location}/Engine/Source/ThirdParty/openssl/1.1.1x/ -DCUSTOM_OPENSSL_LIB_DIR=lib/XXX/ -DCUSTOM_OPENSSL_INCLUDE_DIR=include/XXX/ ``` -------------------------------- ### Build Pubnub C++ Samples (POSIX) Source: https://github.com/pubnub/c-core/blob/master/cpp/README.md Builds all default Pubnub C++ wrapper sample programs on a POSIX system using the `posix.mk` Makefile. ```Makefile make -f posix.mk ``` -------------------------------- ### Build Samples with NMAKE (Windows) Source: https://github.com/pubnub/c-core/blob/master/windows/README.md Builds the Pubnub C-core sample programs and static libraries for the standard Windows platform using the default nmake command and the windows.mk Makefile. ```Shell nmake windows.mk ``` -------------------------------- ### Build Pubnub C++ Samples (Windows) Source: https://github.com/pubnub/c-core/blob/master/cpp/README.md Builds Pubnub C++ wrapper sample programs on a Windows system using the `windows.mak` Makefile and the Microsoft Visual Studio toolchain. ```Makefile nmake -f windows.mak ``` -------------------------------- ### Build Pubnub C-core Samples POSIX Shell Source: https://github.com/pubnub/c-core/blob/master/posix/README.md Executes the default build process for the Pubnub C-core samples on POSIX using the provided `posix.mk` Makefile. ```shell make -f posix.mk ``` -------------------------------- ### Build Project with make/nmake/jom Source: https://github.com/pubnub/c-core/blob/master/qt/README.md After generating the Makefile with `qmake`, use the appropriate build tool (`make` on Unix-like systems, `nmake` or `jom` on Windows with MSVC) to compile the project. ```Shell make ``` ```Shell nmake ``` ```Shell jom ``` -------------------------------- ### Build Pubnub C++11 Samples (POSIX) Source: https://github.com/pubnub/c-core/blob/master/cpp/README.md Builds only the C++11 specific Pubnub C++ wrapper sample programs on a POSIX system using the `posix.mk` Makefile. ```Makefile make -f posix.mk cpp11 ``` -------------------------------- ### Generate Makefile with qmake Source: https://github.com/pubnub/c-core/blob/master/qt/README.md Run `qmake` on the project file (`.pro`) to generate the necessary platform-specific build files, such as Makefiles. This is the first step in compiling the Qt project. ```Shell qmake pubnub.pro ``` ```Shell qmake pubnub_gui.pro ``` -------------------------------- ### Build Samples with NMAKE and Clang (Windows) Source: https://github.com/pubnub/c-core/blob/master/windows/README.md Builds the Pubnub C-core sample programs and static libraries for the standard Windows platform using nmake, specifying clang-cl as the compiler via the CC environment variable. ```Shell nmake -f windows.mk CC=clang-cl ``` -------------------------------- ### Build Pubnub C++98 Samples (POSIX) Source: https://github.com/pubnub/c-core/blob/master/cpp/README.md Builds only the C++98 compatible Pubnub C++ wrapper sample programs on a POSIX system using the `posix.mk` Makefile. ```Makefile make -f posix.mk cpp98 ``` -------------------------------- ### Building Pubnub C-core Samples with Clang-cl (Windows) Source: https://github.com/pubnub/c-core/blob/master/openssl/README.md Executes the Windows Makefile using 'nmake', setting the compiler to 'clang-cl', which is compatible with MSVC switches. Requires a compatible Clang distribution and OpenSSL. ```Makefile nmake -f windows.mk CC=clang-cl ``` -------------------------------- ### Build Pubnub C++ Samples with Clang (POSIX) Source: https://github.com/pubnub/c-core/blob/master/cpp/README.md Builds Pubnub C++ wrapper sample programs on a POSIX system using the `posix.mk` Makefile, explicitly specifying 'clang++' as the C++ compiler. ```Makefile make -f posix.mk CXX=clang++ ``` -------------------------------- ### Build Pubnub C/C++ with CMake on Unix Source: https://github.com/pubnub/c-core/blob/master/README.md Provides the standard shell commands to create a build directory, run CMake to configure the project, and compile it using 'make' on Unix-like systems. ```sh mkdir build && cd build cmake .. make ``` -------------------------------- ### Build Libraries with NMAKE (UWP) Source: https://github.com/pubnub/c-core/blob/master/windows/README.md Builds the Pubnub C-core static libraries for the Universal Windows Platform (UWP) using the default nmake command and the uwp.mk Makefile. ```Shell nmake uwp.mk ``` -------------------------------- ### Build Pubnub C/C++ with CMake on Windows (NMake) Source: https://github.com/pubnub/c-core/blob/master/README.md Provides the shell commands to create a build directory, run CMake specifying the 'NMake Makefiles' generator, and compile the project using 'nmake' on Windows systems. Requires Microsoft Visual Studio tools. ```sh mkdir build && cd build cmake .. -G "NMake Makefiles" nmake ``` -------------------------------- ### Compile PubNub C-Core SDK (Basic) - Shell Source: https://github.com/pubnub/c-core/blob/master/unreal/README.md Compiles the PubNub C-Core SDK using CMake and Make with default options. This is the basic compilation step after cloning the repository. ```sh cmake . && make ``` -------------------------------- ### Build with MINGW GCC Make Source: https://github.com/pubnub/c-core/blob/master/windows/README.md Builds Pubnub C-core using a GCC-compatible compiler (like MINGW) and the windows-gcc.mk Makefile via the mingw32-make command. ```Shell mingw32-make -f windows-gcc.mk ``` -------------------------------- ### Select Qt Version with qtchooser Source: https://github.com/pubnub/c-core/blob/master/qt/README.md Use the `qtchooser` command-line tool to specify a particular Qt version (e.g., Qt5) when running `qmake` on a project file. This ensures the build process uses the correct Qt tools. ```Shell qtchooser -run-tool=qmake -qt=5 pubnub.pro ``` -------------------------------- ### Analyze with Scan-Build and MINGW GCC Make Source: https://github.com/pubnub/c-core/blob/master/windows/README.md Runs static analysis on Pubnub C-core using scan-build with a specific clang analyzer path, executing the build process via sh and make using the windows-gcc.mk Makefile. ```Shell scan-build --use-analyzer="e:/program files/llvm/bin/clang.exe" e:\msys64\usr\bin\sh.exe -c "e:/msys64/usr/bin/make -f windows-gcc.mk" ``` -------------------------------- ### Build Libraries with NMAKE and Clang (UWP) Source: https://github.com/pubnub/c-core/blob/master/windows/README.md Builds the Pubnub C-core static libraries for UWP using nmake, specifying clang-cl as the compiler via the CC environment variable. ```Shell nmake -f uwp.mk CC=clang-cl ``` -------------------------------- ### Build Pubnub C-core Samples with Specific Compiler POSIX Shell Source: https://github.com/pubnub/c-core/blob/master/posix/README.md Builds the Pubnub C-core samples on POSIX using the `posix.mk` Makefile, explicitly setting the C compiler to `clang`. ```shell make -f posix.mk CC=clang ``` -------------------------------- ### Compile C-core with MBedTLS using ESP32 IDF Source: https://github.com/pubnub/c-core/blob/master/mbedtls/README.md This command shows how to build a project that includes the Pubnub C-core library with MBedTLS support using the ESP32 IDF build tool, idf.py. The -DMBEDTLS=ON flag is passed to the build command to enable the necessary configuration. ```sh idf.py build -DMBEDTLS=ON ``` -------------------------------- ### Build with MINGW GCC Make and Clang Source: https://github.com/pubnub/c-core/blob/master/windows/README.md Builds Pubnub C-core using mingw32-make and the windows-gcc.mk Makefile, specifying clang as the compiler via the CC environment variable. ```Shell mingw32-make CC=clang -f windows-gcc.mk ``` -------------------------------- ### Cleaning Build Artifacts (POSIX) Source: https://github.com/pubnub/c-core/blob/master/openssl/README.md Executes the 'clean' target in the POSIX Makefile to remove previously built object files, executables, and libraries. ```Makefile make -f posix.mk clean ``` -------------------------------- ### Compile C-core with MBedTLS using CMake Source: https://github.com/pubnub/c-core/blob/master/mbedtls/README.md This command demonstrates how to enable MBedTLS support when compiling the Pubnub C-core library using the standard CMake command line interface. The -DMBEDTLS=ON flag is used to activate the MBedTLS build configuration. ```sh cmake . -DMBEDTLS=ON ``` -------------------------------- ### Cloning Pubnub C-core for ESP-IDF Source: https://github.com/pubnub/c-core/blob/master/freertos/README.md Clones the Pubnub C-core repository into the 'components' directory of an ESP-IDF project. This makes the C-core available as an external component for building within the ESP-IDF framework. ```sh git clone https://github.com/pubnub/c-core.git components/c-core ``` -------------------------------- ### Build Pubnub C-core Without Proxy Support POSIX Shell Source: https://github.com/pubnub/c-core/blob/master/posix/README.md Builds the Pubnub C-core libraries and samples on POSIX using `posix.mk`, disabling support for proxy functionality by setting `USE_PROXY=0`. ```shell make -f posix.mk USE_PROXY=0 ``` -------------------------------- ### Configure PubNub Module Build Settings - C# Source: https://github.com/pubnub/c-core/blob/master/unreal/README.md Adjusts the build settings for the PubNub Unreal Engine module in the PubNubModule.Build.cs file. These settings should match the options used when compiling the C-Core SDK. ```csharp private bool OpenSsl = true; private bool StaticLink = false; private string BuildLocation = "build/"; ``` -------------------------------- ### Clean Pubnub C-core Build Artifacts POSIX Shell Source: https://github.com/pubnub/c-core/blob/master/posix/README.md Removes build artifacts generated by the `posix.mk` Makefile for the Pubnub C-core project on POSIX. ```shell make -f posix.mk clean ``` -------------------------------- ### Include PubNub Header in C++ - C++ Source: https://github.com/pubnub/c-core/blob/master/unreal/README.md Includes the main PubNub header file in a C++ source file within an Unreal Engine module. This provides access to the PubNub C-Core SDK functions and types. ```cpp #include "PubNub.h" ``` -------------------------------- ### Register PubNub Module in Unreal Project File - JSON Source: https://github.com/pubnub/c-core/blob/master/unreal/README.md Registers the "PubNubModule" within the Unreal Engine project file (.uproject). This declares the module as a runtime module with a default loading phase, making it known to the engine. ```json { //... "Modules": [ //... { "Name": "PubNubModule", "Type": "Runtime", "LoadingPhase": "Default" } ], //... } ``` -------------------------------- ### Add PubNub Module to Unreal Project Targets - C# Source: https://github.com/pubnub/c-core/blob/master/unreal/README.md Adds the "PubNubModule" to the list of extra modules in the Unreal Engine project's target files (.Target.cs). This makes the module available to the project build system. ```csharp public class [Editor]Target : TargetRules { public [Editor]Target (TargetInfo Target) : base(Target) { //... ExtraModuleNames.Add("PubNubModule"); } } ``` -------------------------------- ### Set PubNub Origin for GitHub Actions CI Source: https://github.com/pubnub/c-core/blob/master/CONTRIBUTING.md Sets the PubNub origin URL to "localhost" specifically for use within GitHub Actions continuous integration workflows. This directs the SDK to communicate with a local or CI-specific server endpoint. ```C/C++ pn.set_origin("localhost"); ``` -------------------------------- ### Declare PubNub Module Dependency - C# Source: https://github.com/pubnub/c-core/blob/master/unreal/README.md Declares a dependency on the "PubNubModule" within another Unreal Engine module's build file (.Build.cs). This makes the PubNub module's public headers and libraries available to the dependent module. ```csharp public class : ModuleRules { public (ReadOnlyTargetRules Target) : base(Target) { //... PrivateDependencyModuleNames.Add("PubNubModule"); } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.