mxe/src/guile-test.c

26 lines
593 B
C
Raw Permalink Normal View History

/*
* This file is part of MXE. See LICENSE.md for licensing information.
*/
2010-04-10 07:27:23 +01:00
2013-03-03 14:13:36 +00:00
#include <stdlib.h>
#include <stdio.h>
2010-04-10 07:27:23 +01:00
#include <libguile.h>
static void inner_main(void *data, int argc, char *argv[])
{
(void)data;
(void)argc;
(void)argv;
scm_c_eval_string("(display \"Hello World!\\n\")");
}
int main(int argc, char *argv[])
{
2013-03-03 14:13:36 +00:00
char guile_load_path[40];
snprintf(guile_load_path, sizeof guile_load_path, \
2013-03-03 16:03:13 +00:00
"GUILE_LOAD_PATH=..\\share\\guile\\%s", GUILE_MAJOR_MINOR);
2013-03-03 14:13:36 +00:00
putenv(guile_load_path);
2010-04-10 07:27:23 +01:00
scm_boot_guile(argc, argv, inner_main, NULL);
return 0;
}