cppad
  • Table of Contents
  • user_guide
    • Install
    • Theory
    • AD
    • ADFun
    • preprocessor
    • multi_thread
    • utility
      • CheckNumericType
      • CheckSimpleVector
      • create_dll_lib
      • ErrorHandler
      • index_sort
      • link_dll_lib
        • dll_lib.cpp
      • nan
      • NearEqual
      • OdeErrControl
      • OdeGear
      • OdeGearControl
      • Poly
      • pow_int
      • RombergMul
      • RombergOne
      • Rosen34
      • Runge45
      • set_union
      • sparse2eigen
      • sparse_rc
      • sparse_rcv
      • speed_test
      • SpeedTest
      • test_boolofvoid
      • time_test
      • to_string
      • CppAD_vector
      • lu_det_and_solve
      • NumericType
      • SimpleVector
      • thread_alloc
    • ipopt_solve
    • Example
    • speed
  • appendix
  • Index
  • Search
cppad
  • »
  • user_guide »
  • utility »
  • link_dll_lib
  • View page source

\(\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}} }\)

link_dll_lib¶

Link a Dynamic Link Library¶

  • Syntax

  • Prototype

  • dll_linker

  • err_msg

  • dll_file

  • function_name

  • fun_ptr

    • Warning !!

  • Example

Syntax¶

# include <cppad/utility/link_dll_lib.hpp>
link_dll_lib dll_linker ( dll_file , err_msg )
fun_ptr = dll_linker ( function_name , err_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,

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 .

Warning !!¶

fun_ptr becomes invalid when the dll_linker destructor is called.

Example¶

The file dll_lib.cpp contains an example and test of link_dll_lib .

Next Previous

© Copyright .

Built with Sphinx using a theme provided by Read the Docs.