|
From: | Dylan Nicholson |
Subject: | Re: libguile on Windows |
Date: | Tue, 11 Oct 2005 09:43:47 +1000 |
Thank you so much. Now I get Backtrace: In unknown file: ?: 0* [for-each #<procedure set-system-module! (m s)> ... ?: 1* (list the-root-module the-scm-module) <unnamed port>: In expression (list the-root-module the-scm-module): <unnamed port>: Unbound variable: listThought I knew what the problem was here, but no such luck... The line scm_c_define_gsubr (s_list, 0, 0, 1, (SCM (*)()) scm_list_copy);from list.x didn't compile at first, so I tried commenting it out, then addingstatic char s_list[]="list"; to list.c (it was only in read.c) Still, seems like at least some progress!
I replaced the line listed above from list.x with scm_c_define_gsubr (s_scm_list, 0, 0, 1, (SCM (*)()) scm_list); And now the following C++ program runs and prints "Hello world": #include <iostream> #include "libguile.h" #include "libguile\gh.h" static void main_with_guile (void *, int argc, char ** argv) { std::cout << "Hello "; scm_c_eval_string("(display \"world!\n\")"); } int main(int argc, char* argv[]) { scm_boot_guile (argc, argv, main_with_guile, 0); return 0; }
[Prev in Thread] | Current Thread | [Next in Thread] |