2
0
mirror of https://github.com/boostorg/dll.git synced 2026-02-18 14:02:16 +00:00
Antony Polukhin ebb04ca29c Minor fixes
2014-09-29 20:57:48 +04:00
2014-09-29 20:57:48 +04:00
2014-09-29 20:57:48 +04:00
2014-09-29 19:27:46 +04:00
2014-09-29 19:27:46 +04:00
2014-09-29 19:27:46 +04:00

Boost Dynamic Library Load (Boost.DLL)

Library for comfortable work with DLL and DSO.

Docs

Documentation of Boost.DLL

Hello World (importing a "C" function)

#include <boost/dll.hpp>

...
auto cpp11_func = dll::import_function_alias<std::string(int)>(
    path_to_shared_library, "cpp11_function_alias_name"
);

boost::function<int(int)> c_func
    = boost::dll::import_function<int(int)>(
        path_to_shared_library, "c_func_name"
    );

Installation

  • Boost 1.56 and later:

    • enter the Boost root directory: cd ~/boost_1_56_0/
    • go to libs/ folder: cd libs
    • clone Boost.DLL repository: git clone https://github.com/apolukhin/Boost.DLL dll
    • enter the dll/test folder and run ./b2: cd dll/test; ../../../b2
  • Boost 1.53 - Boost 1.55:

    • enter the Boost root directory: cd ~/boost_1_53_0/
    • go to libs/ folder: cd libs
    • clone Boost.DLL repository: git clone https://github.com/apolukhin/Boost.DLL dll
    • clone the Boost.Predef repository: git clone https://github.com/boostorg/predef
    • copy headers from dll/include/boost and predef/include/boost to the boost folder with headers: cp -rf dll/include/boost/* ~/boost_1_53_0/boost/; cp -rf predef/include/boost/* ~/boost_1_53_0/boost/;

Platforms tested

Library was tested on Windows and Linux (MacOS is upcomming) with GCC, Clang and MSVC compilers.

Caution

This is not an official Boost C++ library. It wasn't reviewed and can't be downloaded from www.boost.org. This beta is available to boost community to know real interest and get comments for refinement. The intention is to submit library to formal review, if community think that it is interesting!

About

This library was derived from the Boost.Application library.

Test results

@ Build Tests coverage
Develop branch: Build Status Coverage Status
Master branch: Build Status Coverage Status

License

Distributed under the Boost Software License, Version 1.0.

Description
Mirrored via gitea-mirror
Readme 2.8 MiB
Languages
C++ 99.1%
CMake 0.7%
HTML 0.2%