[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Linking Guile with Borland C++Buider
From: |
John Fitzgerald |
Subject: |
RE: Linking Guile with Borland C++Buider |
Date: |
Tue, 13 Mar 2001 11:29:37 +1300 |
>
> You might want to try out
>
> http://www.textsure.net/~ela/download/guile-1.4.zip
>
> which is a native port of Guile 1.4 to Windows, compiled with M$ Visual C.
>
Thanks, Martin. You're a life saver.
To link this Guile with Borland C++Builder I needed to do the following:
1. Apply the following patches:
--- guile-1.4/include/libguile/numbers.h Tue Jan 23 10:38:51 2001
+++ guile-1.4/include/libguile/numbers.h Tue Mar 13 10:08:35 2001
@@ -64,7 +64,7 @@
*/
/* SCM_SRS is signed right shift */
-#if (-1 == (((-1) << 2) + 2) >> 2)
+#if (-1 == ((((-1) << 2) + 2) >> 2))
# define SCM_SRS(x, y) ((x) >> (y))
#else
# define SCM_SRS(x, y) ((SCM_UNPACK (x) < 0) ? ~((~SCM_UNPACK (x)) >>
(y)) : (SCM_UNPACK (x) >> (y)))
--- guile-1.4/include/libguile/__scm.h Tue Jan 23 10:38:51 2001
+++ guile-1.4/include/libguile/__scm.h Tue Mar 13 10:09:05 2001
@@ -203,7 +203,7 @@
/* Some auto-generated .h files contain unused prototypes
* that need these typedefs.
*/
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 long_long;
typedef unsigned __int64 ulong_long;
#else
--- guile-1.4/include/libguile/scmconfig.h Tue Jan 23 10:38:51 2001
+++ guile-1.4/include/libguile/scmconfig.h Tue Mar 13 10:08:18 2001
@@ -23,7 +23,9 @@
#define GETGROUPS_T int
/* Define to `int' if <sys/types.h> doesn't define. */
+#ifndef __BORLANDC__
#define gid_t int
+#endif
/* Define if you have alloca, as a function or macro. */
#define HAVE_ALLOCA 1
@@ -92,7 +94,9 @@
/* #undef TM_IN_SYS_TIME */
/* Define to `int' if <sys/types.h> doesn't define. */
+#ifndef __BORLANDC__
#define uid_t int
+#endif
/* Define these two if you want support for debugging of Scheme
programs. */
2. Run the libguile.lib file through the Borland Coff2Omg untility (which I
believe is only available with the Enterprise edition of C++Builder).
3. Download the regex library from the same location:
http://www.textsure.net/~ela/download/regex-0.12.zip
4. Move the .h, .lib and .dll files to places where they can be found.
5. Place these statements in the C++ source code:
#include "guile/gh.h"
#pragma link "libguile.lib"
6. Compile.
7. Set the environment variable GUILE_LOAD_PATH to the location of ice-9.
I have not tested it extensively, but certainly straight forward tests work.