This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Windoze NT, Visual C and guile


I was able to get guile running fairly easily on win NT in a gnuwin32
environment.  I've not
yet run anything more complicated than '(display "foo\n")', but that
works.  Sorry, no time
for more testing, and I can't help with MSVC, but maybe this will help
somebody.  
I'm set up with a complete unix environment so I never have to use yucky
windows tools.
Everything under bash.

bash --version
GNU bash, version 2.01.1(2)-release (i386-pc-cygwin32)
Copyright 1997 Free Software Foundation, Inc.

gcc --version
egcs-2.91.57

ld -v
GNU ld version 2.9.4 (with BFD 980830)


bug in configure:

ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
  # Check if gcc -print-prog-name=ld gives a path.
  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
echo "configure:1193: checking for ld used by GCC" >&5
  ac_prog=`($CC -print-prog-name=ld) 2>&5`
  case "$ac_prog" in
  # Accept absolute paths.
  /* | A-Za-z:\\*)	    <============= add brackets: [A-Za-z]



portability problem in libguile/filesys.c:

scm_chown (object, owner, group)
...snip
  if (SCM_INUMP (object) || (SCM_NIMP (object) && SCM_OPFPORTP
(object)))
    {
...snip
      /*      SCM_SYSCALL (rv = fchown (fdes, SCM_INUM (owner), SCM_INUM
(group))); */  
		/*======= fchown is missing from unistd.h ========*/
    }
  else
    {
...snip


Notice you need to invoke bash, even if you're already in bash:

c:\...\guile-1.3>bash ./configure --enable-static=yes
--enable-dynamic-linking=no --with-gnu-ld
...
c:\guile-1.3>make
...

add  GUILE_LOAD_PATH=/.../guile-1.3  to environment variables page of
the system applet in control panel;
otherwise you'll get:
C:\...\guile-1.3>cd libguile
C:\...\guile-1.3\libguile>./guile
./guile
ERROR: In procedure primitive-load-path:
ERROR: Unable to find file "ice-9/boot-9.scm" in load path

Make sure you have a home directory, etc - a standard unixy environment:
HOME=c:/home

The first time I had trouble figuring out where to put the .guile file
and had to:

in /ice-9/boot-9.scm:

(define (load-user-init)
  (define (has-init? dir)
    (let ((path (in-vicinity dir ".guile")))
      (catch 'system-error 
	     (lambda ()
	       (let ((stats (stat path)))
		 (if (not (eq? (stat:type stats) 'directory))
		     path)))
	     (lambda dummy #f))))
  (let ((path (or (has-init? (or (getenv "HOME") "/"))
                  "/home/.guile")));   (has-init? (passwd:dir (getpw
(getuid)))))))  <=== sorry, hardcoded
    (if path (primitive-load path))))

But once I had a .guile file in my home directory I was able to remove
the edit and
things seem to work ok.  A helpful error handler at this point would be
good.

-----Original Message-----
From: Tel [mailto:telford@eng.uts.edu.au]
Sent: Wednesday, October 28, 1998 2:08 AM
To: guile@cygnus.com
Subject: Re: Windoze NT, Visual C and guile


> Is there a port of guile to the Visual C++ enviroment?  I know it's a
sad
> question, but unfortunately I have to use Visual C++ and not some
other
> compiler.  It's an employment thing...  

I've got it going under DJGPP and egcs-wingwin32 (both related to gcc)
under Microsoft Win95 and Win-NT. 
...snip