This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
#include <stdio.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
void *handle;
|
||||
void (*caml_startup)(char **argv);
|
||||
handle = dlopen(argv[1], RTLD_NOW | RTLD_GLOBAL);
|
||||
if (handle == NULL) {
|
||||
fprintf(stderr, "%s\n", dlerror());
|
||||
return 1;
|
||||
}
|
||||
caml_startup = dlsym(handle, "caml_startup");
|
||||
if (handle == NULL) {
|
||||
fprintf(stderr, "%s\n", dlerror());
|
||||
return 1;
|
||||
}
|
||||
caml_startup(argv);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue