5.4.4. Integration by Building from Source - 5.2 English - 57404

AOCL User Guide (57404)

Document ID
57404
Release Date
2025-12-29
Version
5.2 English

If building both the library and application from source, you can modify your application to invoke AOCL-Compression APIs to leverage on optimized lossless data compression features and unified API set provided by the library.

Follow these steps to integrate AOCL-Compression into your application from source:

  1. Make necessary changes in your application to invoke unified API set. Refer to examples/example_unified_api.c in the installed package for details on how to invoke the unified APIs to perform compression and decompression.

  2. Make necessary changes in your build system to link your application to AOCL-Compression library. A Sample CMakeLists file is shown for your reference.

  3. Build the application.

  4. If the library is linked via dynamic linking, before running the application, ensure that it is pointing to the correct AOCL-Compression library. If not, use these steps to ensure right dependency:

    1. On Linux: LD_LIBRARY_PATH environment variable can be used to set directories where the dynamic linker should search for libraries before looking in the default system locations. Add AOCL-Compression library path to it as follows:

      export LD_LIBRARY_PATH="lib/directory/path/of/AOCL-Compression": $LD_LIBRARY_PATH
      
    2. On Windows: PATH environment variable is used by the OS to search for shared libraries required by a program at runtime. Add AOCL-Compression library path to it as follows:

      set PATH="lib/directory/path/of/AOCL-Compression";%PATH%
      
  5. Run the application.