[Ecls-list] ECL & static symbol references with CFFI

Sylvain Ageneau ageneau at gmail.com
Fri Nov 23 14:07:49 UTC 2012


Just a note that in the previous patch, the extra "{}" is also needed in the format string because otherwise gcc complains about the extern declaration just after a label in the case of a function with no return value:

TTL:
	extern void srand(unsigned int); srand(ecl_to_uint(V1));
	value0=ECL_NIL; cl_env_copy->nvalues=1;
	return value0; 


cffi-test.c: In function ‘L1c_srand’:
cffi-test.c:16: error: expected expression before ‘extern’
cffi-test.c: In function ‘L2test_srand’:
cffi-test.c:29: error: expected expression before ‘extern’



On Nov 22, 2012, at 6:01 PM, Sylvain Ageneau <ageneau at gmail.com> wrote:

> Yes it does! cl-opengl builds fine and the GLES functions are correctly called.
> 
> I can't test properly yet because I still need to add the callbacks for at least some of the OpenGLES functions/extensions that are not in the pure OpenGL spec but I think it shouldn't be too much trouble.
> 
> Thanks again!
> 
> 
> 
> On Nov 22, 2012, at 5:41 PM, Juan Jose Garcia-Ripoll <juanjose.garciaripoll at gmail.com> wrote:
> 
>> On Thu, Nov 22, 2012 at 8:27 PM, Sylvain Ageneau <ageneau at gmail.com> wrote:
>> Doing the following change seems to fix the issue:
>> 
>> Yes, indeed I forgot about functions that do not return any value. But does the static linking now work for you?
>> 
>> Juanjo
>> 
>> -- 
>> Instituto de Física Fundamental, CSIC
>> c/ Serrano, 113b, Madrid 28006 (Spain) 
>> http://juanjose.garciaripoll.googlepages.com
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20121123/d7409792/attachment.html>


More information about the ecl-devel mailing list