Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <unistd.h>
00024 #include <dlfcn.h>
00025 #include <stdio.h>
00026
00027 typedef int (*main_f)(int argc, char *argv[]);
00028
00029 int main(int argc, char *argv[])
00030 {
00031 main_f ast_main = NULL;
00032 void *handle = dlopen("asterisk.dll", 0);
00033 if (handle)
00034 ast_main = (main_f)dlsym(handle, "main");
00035 if (ast_main)
00036 return ast_main(argc, argv);
00037 fprintf(stderr, "could not load Asterisk, %s\n", dlerror());
00038 return 1;
00039 }