gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: FW: [sr #104164] Is it possible to call Windows SDK from


From: Camm Maguire
Subject: [Gcl-devel] Re: FW: [sr #104164] Is it possible to call Windows SDK from GCL?
Date: 05 May 2005 14:49:36 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

I've now lost the input lisp file, but the problem is that the C
definition needs to precede its usage in the .c output file:


#include "cmpinclude.h"
#include "sdk-hello.h"
void init_sdk_hello(){do_init(VV);}
#include <windows.h>
/*      function definition for SDK-HELLO       */

static void L1()
{       object *old_base=vs_base;
        object x;
        x=
        sdk_hello(
        vs_base[0]);
        vs_top=(vs_base=old_base)+1;
        vs_base[0]=x;
}
/*      C function defined by DEFCFUN   */

static object sdk_hello( object ret )
{
object *vs=vs_top;
object *old_top=vs_top+0;
{
MessageBox( NULL, "Hello world!", "Hello demo", MB_OK );
return ret;
}
vs_top=vs;
}

#ifdef SYSTEM_SPECIAL_INIT
SYSTEM_SPECIAL_INIT
#endif


Does this differ in 2.7 and 2.6?  If you could supply the lisp again I
can check too. 

Take care,

"Mike Thomas" <address@hidden> writes:

> Hi Camm.
> 
> | To use compiler::link, you have to set the :system-p t flag in
> | compiler-file, or alternately (setq compiler::*default-system-p* t).
> | This will ensure that the init functions for each module will be
> | uniquely named based on the lisp filename, as compiler::link expects.
> | This should be mentioned in the docs.  Otherwise your call above is
> | fine.
> 
> Per separate message this all worked thanks.
> 
> | What is the sdk btw?
> 
> Shorthand for the Microsoft Windows Software Development Kit which comprises
> most (if not all) of the Windows libraries, headers, examples, documentation
> etc and is downloadable for free from the Micsosoft Developers Network
> (MSDN) site - a very big download.
> 
> 
> | > O3  -c -w \"c:/cvs/stable/gcl-2.6.7pre/sdk-hello.c\" -o
> | > \"c:/cvs/stable/gcl-2.6.
> | > 7pre/sdk-hello.o\"") returned a non-zero value 1.
> | >
> | > Fast links are on: do (use-fast-links nil) for debugging
> | > Broken at UNLESS.
> | >  1 (Continue) Continues anyway.
> | >  2 Return to break level 1.
> | >  3 Return to top level.
> | > dbl:>>>
> |
> | Mike, two questions here:
> |
> | 1) This is 2.6.7pre, not CVS head, no?
> 
> Yes; the problem also occurs for CVS HEAD as I was using gcc 3.4.2 for both
> of those builds.
> 
> 
> | 2) What are lines 5289 and 5281 (with a little context) of
> |    sdk-hello.c?
> 
> I recompiled using the CVS HEAD and the :system-p t flag which makes a much
> smaller file which is now attached to this message:
> 
> ==============================================
> >(compile-file "c:/cvs/stable/gcl-2.6.7pre/sdk-hello.lsp" :system-p t)
> 
> Compiling c:/cvs/stable/gcl-2.6.7pre/sdk-hello.lsp.
> End of Pass 1.
> End of Pass 2.
> c:/cvs/stable/gcl-2.6.7pre/sdk-hello.c:20: error: conflicting types for
> 'sdk_hel
> lo'
> c:/cvs/stable/gcl-2.6.7pre/sdk-hello.c:12: error: previous implicit
> declaration
> of 'sdk_hello' was here
> (SYSTEM
> "gcc -c -Wall -DVOL=volatile -fsigned-char -pipe -fno-zero-initialized-i
> n-bss -mms-bitfields -march=i686 -mfpmath=387 -Ic:/cvs/head/gcl/unixport/../
> h  -
> O3  -c -w \"c:/cvs/stable/gcl-2.6.7pre/sdk-hello.c\" -o
> \"c:/cvs/stable/gcl-2.6.
> 7pre/sdk-hello.o\"") returned a non-zero value 1.
> 
> Fast links are on: do (use-fast-links nil) for debugging
> Broken at UNLESS.
>  1 (Continue) Continues anyway.
>  2 Return to break level 1.
>  3 Return to top level.
> dbl:>>>3
> 
> Error in UNLESS [or a callee]: The tag (NIL) is undefined.
> 
> Fast links are on: do (use-fast-links nil) for debugging
> Broken at CERROR.
>  1 (Abort) Return to debug level 1.
>  2 Continues anyway.
>  3 Return to break level 1.
>  4 Return to top level.
> dbl:>>>>
> 
> ==============================================
> 
> Cheers
> 
> Mike Thomas.
> 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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