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: list


Thought 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 adding
static 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;
}





_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user

Reply via email to