Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
autorake / examples / dlcpp / dl.cpp
Size: Mime:
//
//  dl.cpp  --  Dynamic libraries
//

#include "dl.h"

#include <iostream>


Dl::Dl( const char *path, int mode) :
    H( dlopen( path, mode))
{
    if (!H)
        throw Error();
}

void *Dl::sym( const char *sym) const
{
    void *r = dlsym( H, sym);
    if (!r)
        throw Error();
    return r;
}