11 #include <unittest-support.h>
13 #include "gnc-module.h"
16 guile_main(
void *closure,
int argc,
char ** argv)
19 gchar *msg =
"Module '../../../src/gnc-module/test/misc-mods/.libs/libgncmod_futuremodsys.so' requires newer module system\n";
20 gchar *logdomain =
"gnc.module";
22 guint loglevel = G_LOG_LEVEL_WARNING;
24 g_log_set_handler (logdomain, loglevel,
25 (GLogFunc)test_checked_handler, &check);
27 g_test_message(
" test-dynload.c: testing dynamic linking of libgnc-module ...");
30 modpath = g_module_build_path (
"../.libs",
"gnc-module-0");
31 #elif defined(PLATFORM_OSX)
36 modpath = g_build_filename (
"..",
".libs",
"libgnc-module.dylib", NULL);
38 modpath = g_module_build_path (
"../.libs",
"gnc-module");
40 gmodule = g_module_open(modpath, 0);
45 if (g_module_symbol(gmodule,
"gnc_module_system_init", &ptr))
47 void (* fn)(void) = ptr;
54 printf(
" failed to find gnc_module_system_init\n");
60 printf(
" failed to open library.\n");
61 printf(
"%s\n", g_module_error());
67 main(
int argc,
char ** argv)
69 scm_boot_guile(argc, argv, guile_main, NULL);