2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 1999 - 2005, Digium, Inc.
6 * See http://www.asterisk.org for more information about
7 * the Asterisk project. Please do not directly contact
8 * any of the maintainers of this project for assistance;
9 * the project provides a web site, mailing lists and IRC
10 * channels for your use.
12 * This program is free software, distributed under the terms of
13 * the GNU General Public License Version 2. See the LICENSE file
14 * at the top of the source tree.
19 * Loader for Asterisk under Cygwin/windows.
20 * Open the dll, locate main, run.
27 typedef int (*main_f
)(int argc
, char *argv
[]);
29 int main(int argc
, char *argv
[])
31 main_f ast_main
= NULL
;
32 void *handle
= dlopen("asterisk.dll", 0);
34 ast_main
= (main_f
)dlsym(handle
, "main");
36 return ast_main(argc
, argv
);
37 fprintf(stderr
, "could not load Asterisk, %s\n", dlerror());
38 return 1; /* there was an error */