<a href="http://clhs.lisp.se/Body/m_defcon.htm">http://clhs.lisp.se/Body/m_defcon.htm</a><br><div><br></div><div>DEFCONSTANT has compile-time side effects. Unfortunately C-INLINE cannot be evaluated at compilation time because it cannot be interpreted.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 13, 2012 at 4:17 PM, Peter Enerccio <span dir="ltr"><<a href="mailto:enerccio@gmail.com" target="_blank">enerccio@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br><br>I am trying to compile file containing only this:<br><br>(DEFCONSTANT +SDL_HWSURFACE+ <br> (FFI:C-INLINE () () :INT "SDL_HWSURFACE" :ONE-LINER T :SIDE-EFFECTS NIL))<br>
<br>however, I get <br><br clear="all">
> (compile-file "test.lisp")<br><br>;;;<br>;;; Compiling test.lisp.<br>;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0<br>;;;<br>;;; Error:<br>;;; in file test.lisp, position 0<br>;;; at (DEFCONSTANT +SDL_HWSURFACE+ ...)<br>
;;; * The form (PROGN (SI:*MAKE-CONSTANT '+SDL_HWSURFACE+ (FFI:C-INLINE NIL NIL :INT "SDL_HWSURFACE" :ONE-LINER T :SIDE-EFFECTS NIL)) (SI::REGISTER-GLOBAL '+SDL_HWSURFACE+)) was not evaluated successfully.<br>
;;; Error detected:<br>;;; The special form c-inline cannot be used in the interpreter: (NIL NIL INT SDL_HWSURFACE ONE-LINER T SIDE-EFFECTS NIL)<br><br><br>Why is that? The file is compiled, not evaluated. Also, I tried to put it around eval-when with only :compile-toplevel option and it still failed.<span class="HOEnZb"><font color="#888888"><br>
<br>-- <br>Bc. Peter Vaňušanik<br><a href="http://www.bishojo.tk" target="_blank">http://www.bishojo.tk</a><br><br>
</font></span><br>------------------------------------------------------------------------------<br>
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial<br>
Remotely access PCs and mobile devices and provide instant support<br>
Improve your efficiency, and focus on delivering more value-add services<br>
Discover what IT Professionals Know. Rescue delivers<br>
<a href="http://p.sf.net/sfu/logmein_12329d2d" target="_blank">http://p.sf.net/sfu/logmein_12329d2d</a><br>_______________________________________________<br>
Ecls-list mailing list<br>
<a href="mailto:Ecls-list@lists.sourceforge.net">Ecls-list@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/ecls-list" target="_blank">https://lists.sourceforge.net/lists/listinfo/ecls-list</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>
</div>