(file) Return to chkshlib.cpp CVS log (file) (dir) Up to [OMI] / omi / chkshlib

File: [OMI] / omi / chkshlib / chkshlib.cpp (download)
Revision: 1.1, Mon Apr 20 17:19:50 2015 UTC (9 years ago) by krisbash
Branch: MAIN
CVS Tags: OMI_1_0_8_2, OMI_1_0_8_1, HEAD
OMI 1.0.8-1

#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <pal/shlib.h>

int main(int argc, char** argv)
{
    if (argc != 2)
    {
        fprintf(stderr, "Usage %s SHAREDLIBRARY\n", argv[0]);
        exit(1);
    }

    void* handle = dlopen(argv[1], PAL_DLOPEN_FLAGS);

    if (!handle)
    {
        fprintf(stderr, "%s: %s\n", argv[0], dlerror());
        exit(1);
    }

    dlclose(handle);

    return 0;
}

ViewCVS 0.9.2