[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Gcl-devel] Using GCL for games development

From: Mike Thomas
Subject: RE: [Gcl-devel] Using GCL for games development
Date: Thu, 14 Aug 2003 10:25:09 +1000

Hi Erik.

Welcome to GCL.

| I have been thinking about trying to make a game in common lisp (using
| SDL) and after doing some research it seemed like GCL would be a good
| choice being portable, fast and LGPL.
| I have some troubles understanding the ffi mechanisms however. I haven't
| seen it explicitly documented anywhere (or have I just missed it?) so I
| have been trying to figure it out through google. I have downloaded the
| OpenGL-bindings and pargcl as well as some KCL manual and read the info
| file.

Sounds exciting.  The only documentation I've found on the GCL FFI has been
in the info files under the heading "GCL Specific".  Strangely the heading
"C Interface" does not describe or refer to those functions.

| Clines and defentry allows me to call a foreign function as long as no
| extra linking is required and I can call functions like strlen as well,
| but how do I add extra libraries?

The only way I have found so far (on Windows) is to include the FFI calls in
a new file during the raw_gcl build; that is, to build GCL from scratch
including your new source file.

This is that way that the XDR and JAPI function libraries are built in and
if memory serves, that is also how the OpenGL and parGCL libraries work too.

For example, when japi is configured into the system, there is a line in the
"makedefs" file (again, on Windows) like this:

  LIBS= -lm -lmingwex -ljapi -lws2_32 -loncrpc

and the object file is brought into the make system in the same file like

  EXTRA_LOBJS= japi.o

So, "japi.lsp" in the lsp directory which contains the FFI calls is compiled
and the object file is built into raw_gcl, and the libraries
(-ljapi -lws2_32) are included at link time in the list of libs.

| I understand that si::faslink doesn't
| work on most systems

I understand that is the case.

| but I have seen something about make "EXPORTS=..."
| and .data files but I'm not sure how to use it.

Nor me.

| Another thing I'm wondering about is the future license of the project, is
| it supposed to change GPL or is it going to remain LGPL? As far as I
| understand it everything you would type into a GPL:d Lisp would have to be
| GPL as well if it shouldn't break the license.

I understand that Camm is doing everything he can to ensure that end images
produced by GCL are not GPLed provided that they do not use GPL libraries
such as readline or bfd, or include the emacs unexec functionality.

| An odd thing I noticed while trying to figure out the ffi was that c files
| where being compiled with -O6. I thought that gcc didn't use
| anything above
| O3 and that O2 was usually faster (at least on athlons).

Yes, I don't know why gcc O levels higher than 3 are used also - I've
commented before but noone ever replied.  It doesn't really harm anyone as
it happens.


Mike Thomas.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]