chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] bind error : "bad prototype syntax"


From: David Dreisigmeyer
Subject: [Chicken-users] bind error : "bad prototype syntax"
Date: Wed, 8 Dec 2010 10:26:44 -0500

For the attached scheme file I'm getting the error below.  The line
it's complaining about looks like this:

extern CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDs(
        cl_platform_id ,
        cl_device_type ,
        cl_uint ,
        cl_device_id * ,
        cl_uint * ) CL_API_SUFFIX__VERSION_1_0;

cl_int and CL_API_CALL are in cl_platform.h which is included in cl.h.  Putting

#include <AvailabilityMacros.h>
#include <OpenCL/cl_platform.h>

in cl.scm results in the same error also.  Thanks again, -Dave


$ csc -s -o cl.so cl.scm -framework OpenCL -framework Accelerate -vv
/usr/local/bin/chicken-4.6.0 cl.scm -output-file cl.c -dynamic
-feature chicken-compile-shared -verbose
Loading compiler extensions...
debugging info: calltrace
loading identifier database /usr/local/lib/chicken/5/modules.db ...
compiling `cl.scm' ...
pass: source
; loading /usr/local/lib/chicken/5/bind.import.so ...
; loading /usr/local/lib/chicken/5/scheme.import.so ...
; loading /usr/local/lib/chicken/5/chicken.import.so ...
; loading /usr/local/lib/chicken/5/foreign.import.so ...
; loading /usr/local/lib/chicken/5/bind-translator.so ...
; loading /usr/local/lib/chicken/5/silex.so ...
; loading /usr/local/lib/chicken/5/matchable.so ...

Error: during expansion of (bind19 ...) - bad prototype syntax: ((id
"cl_int") (id "CL_API_CALL") (id "clGetDeviceIDs") open-paren (id
"cl_platform_id") comma (id "cl_device_type") comma (id "cl_uint")
comma (id "cl_device_id") star comma (id "cl_uint") star close-paren
(id "CL_API_SUFFIX__VERSION_1_0"))

        Call history:

        <syntax>          (##core#module cl #t (import scheme chicken bind) 
(bind*
"\n#include <OpenCL/cl.h>\n\n___declare(exp...
        <syntax>          (import scheme chicken bind)
        <syntax>          (##core#undefined)
        <syntax>          (bind* "\n#include
<OpenCL/cl.h>\n\n___declare(export_constants , yes)\n\n#define CL_TRUE
          ...
        <syntax>          (##core#begin (declare18 (foreign-declare "\n#include
<OpenCL/cl.h>\n\n___declare(export_constants ,...
        <syntax>          (declare18 (foreign-declare "\n#include
<OpenCL/cl.h>\n\n___declare(export_constants , yes)\n\n#defi...
        <syntax>          (##core#declare (foreign-declare "\n#include
<OpenCL/cl.h>\n\n___declare(export_constants , yes)\n\n...
        <syntax>          (##core#begin (##core#undefined))
        <syntax>          (##core#undefined)
        <syntax>          (bind19 "\n#include
<OpenCL/cl.h>\n\n___declare(export_constants , yes)\n\n#define CL_TRUE
         ...    <--

Error: shell command terminated with non-zero exit status 17920:
/usr/local/bin/chicken-4.6.0 cl.scm -output-file cl.c -dynamic
-feature chicken-compile-shared -verbose

Attachment: cl.scm
Description: Binary data


reply via email to

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