#include #include int main(int argc, char **argv) { void *handle; // double (*cosine)(double); char *error; fprintf (stdout, ".dll TEST...\n"); // handle = dlopen("/home/mmckerns/tools/pythia-0.8/modules/arrayDemo/arrayDemomodule.dll", RTLD_LAZY); handle = dlopen("/home/mmckerns/tools/pythia-0.8/modules/journal/_journalmodule.dll", RTLD_LAZY); if (!handle) { fprintf (stderr, "%s\n", dlerror()); exit(1); } fprintf (stdout, ".dll opened\n"); /* cosine = dlsym(handle, "cos"); if ((error = dlerror()) != NULL) { fprintf (stderr, "%s\n", error); exit(1); } printf ("%f\n", (*cosine)(2.0)); */ dlclose(handle); fprintf (stdout, ".dll closed\n"); return 0; }