#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <dlfcn.h>

int main(int argc, char **argv)
{
	
    int (*func)(int);
    void *hdl;
    int size;
    
	hdl = dlopen("dll.so", RTLD_NOW);
	if(hdl == NULL)printf("%s\n", dlerror());
	func = dlsym(hdl, "foo");
	if(func == NULL)printf("%s\n", dlerror());
	else func(32);

    return 0;
}
