2 TiMidity++ -- MIDI to WAVE converter and player
3 Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
4 Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #endif /* HAVE_CONFIG_H */
27 #include <dld.h> /* GNU DLD header file */
33 void dl_init(int argc, char **argv)
38 dlderr = dld_init("/proc/self/exe");
42 dlderr = dld_init(dld_find_executable(argv[0]));
44 char *msg = dld_strerror(dlderr);
45 fprintf(stderr, "dld_init(%s) failed: %s\n", argv[0], msg);
50 void *dl_load_file(char *filename)
54 dlderr = dld_link(filename);
57 fprintf(stderr, "dld_link(%s): %s\n", filename, dld_strerror(dlderr));
64 void *dl_find_symbol(void *libhandle, char *symbolname)
68 RETVAL = (void *)dld_get_func(symbolname);
71 fprintf(stderr, "dl_find_symbol: Unable to find '%s' symbol\n",
77 void dl_free(void *libhandle)