summaryrefslogtreecommitdiffstats
path: root/src/guile-test.c
blob: f3a6ef6f0339d1641cd7e1e4be0b66750b83f175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * This file is part of MXE.
 * See index.html for further information.
 */

#include <stdlib.h>
#include <stdio.h>
#include <libguile.h>

# ifdef __STRICT_ANSI__
int putenv (char *);
# endif

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[])
{
    char guile_load_path[40];
    snprintf(guile_load_path, sizeof guile_load_path, \
        "GUILE_LOAD_PATH=..\\share\\guile\\%s", GUILE_MAJOR_MINOR);
    putenv(guile_load_path);
    scm_boot_guile(argc, argv, inner_main, NULL);
    return 0;
}