Prev Next

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@This is cppad-20221105 documentation. Here is a link to its current documentation .
Link a Dynamic Link Library

Syntax
# include <cppad/utility/link_dll_lib.hpp>
link_dll_lib dll_linker(dll_fileerr_msg)
fun_ptr = dll_linker(function_nameerr_msg)

Prototype

    link_dll_lib(const std::string& dll_file, std::string& err_msg);
    ~link_dll_lib(void);
    void* operator()
    (const std::string& function_name, std::string& err_msg) const;    

dll_linker
Is the dynamic link object that holds an in memory version of the library, It must not be deleted for as long as any fun_ptr return values is used.

err_msg
If err_msg is non-empty, it contains an error message for the corresponding operation.

dll_file
Is the file containing the dynamic link library.

function_name
Is the name of an external entry point in the dll.

fun_ptr
Is a void* version of a pointer the function corresponding to function_name .

Example
The file dll_lib.cpp contains an example and test of link_dll_lib.
Input File: include/cppad/utility/link_dll_lib.hpp