Re: [Ecls-list] Wrapping C++ constants...

2013-07-11 Thread Dietrich Bollmann
Hi Matt, Thank you! So the following works: (let () (defconstant +xy-plane+ (ffi:c-inline () () :pointer-void "(void *) &ON_xy_plane" :one-liner t))) Here - just for reference - a link to the file contrib/sockets/sockets.lisp: http://sourceforge.net/p/ecls/ecl/ci/master/tree/contrib/sockets/s

Re: [Ecls-list] Wrapping C++ constants...

2013-07-11 Thread Matthew Mondor
On Thu, 11 Jul 2013 20:26:11 +0900 Dietrich Bollmann wrote: > I want to wrap a pointer to a C++ constant into a lisp constant. > > The following > > (defconstant +xy-plane+ > (ffi:c-inline () () :pointer-void "(void *) &ON_xy_plane" :one-liner t)) > > results in this error: [...] > > Bu

Re: [Ecls-list] How to wrap C++ classes using ECLs foreign function interface?

2013-07-11 Thread Matthew Mondor
On Thu, 11 Jul 2013 20:46:15 +0900 Dietrich Bollmann wrote: > [An answer to my own posting - I hope this is helpful for others with > similar problems] > > Hi, > > Here how I finally solved the problem and wrapped the C++ class (sorry for > the long delay): > [...] That is pretty nice and clea

Re: [Ecls-list] ECL as an embedded language on an Android game

2013-07-11 Thread Juan Jose Garcia-Ripoll
On Thu, Jul 11, 2013 at 3:31 PM, Anton Vodonosov wrote: > Maybe it is impossible to give a 100% guarantee to cross compile any CL > code. > But I guess more than 93% of useful libraries are not affected but such > issues and > can be cross-compiled as is, without even tuning them. > You know, as

Re: [Ecls-list] ECL as an embedded language on an Android game

2013-07-11 Thread Anton Vodonosov
11.07.2013, 16:40, "Juan Jose Garcia-Ripoll" : > On Thu, Jul 11, 2013 at 2:04 PM, Anton Vodonosov wrote: >> I think (hope) there are not so many places in CL which allow to couple the >> code with the host compiler. >> Maybe this example with most-postivive-fixnum (-negative-long-float, etc) is

Re: [Ecls-list] ECL as an embedded language on an Android game

2013-07-11 Thread Juan Jose Garcia-Ripoll
On Thu, Jul 11, 2013 at 2:04 PM, Anton Vodonosov wrote: > > I think (hope) there are not so many places in CL which allow to couple > the code with the host compiler. > Maybe this example with most-postivive-fixnum (-negative-long-float, etc) > is the only one? > If so, it must be very very rare c

Re: [Ecls-list] ECL as an embedded language on an Android game

2013-07-11 Thread Anton Vodonosov
11.07.2013, 13:43, "Juan Jose Garcia-Ripoll" : > However, the fact that lisp code needs to load former instances of itself to > compile new code may still have subtle side effects -- > i.e. one macro inspects the value of most-positive-fixnum and uses that value > as is instead of the symbol nam

Re: [Ecls-list] How to wrap C++ classes using ECLs foreign function interface?

2013-07-11 Thread Dietrich Bollmann
[An answer to my own posting - I hope this is helpful for others with similar problems] Hi, Here how I finally solved the problem and wrapped the C++ class (sorry for the long delay): The C++ class: --- /* Cube.h, Dietrich Bollmann, Kamakura 2013/06/15 */ #ifndef CUBE_H #define CUBE_H class

[Ecls-list] Wrapping C++ constants...

2013-07-11 Thread Dietrich Bollmann
Hi, I want to wrap a pointer to a C++ constant into a lisp constant. The following (defconstant +xy-plane+ (ffi:c-inline () () :pointer-void "(void *) &ON_xy_plane" :one-liner t)) results in this error: ;;; Error: ;;; in file rhino-lisp-api.lisp, position 7235 ;;; at (DEFCONSTA

Re: [Ecls-list] How to prepend a "prologue" to the c-code generated by asdf:make-build?

2013-07-11 Thread Dietrich Bollmann
[An answer to my own question in the hope to help others experimenting the same problem] Hi, I found the following hack to overcome the problem: The name of the header file included at the top of the generated c file is defined in the variable COMPILER::*cmpinclude*. It is therefore possible to

Re: [Ecls-list] ECL as an embedded language on an Android game

2013-07-11 Thread Juan Jose Garcia-Ripoll
On Mon, Jul 8, 2013 at 1:41 PM, Anton Vodonosov wrote: > I think people do not often cross compile Lisp code for other platforms. > Therefore not so many information is published. You can search the mailing > list. > But also, as I said, you should understand how the build process works. > Some w