chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] "Dynamically Loading" non-entry-point code


From: felix
Subject: Re: [Chicken-users] "Dynamically Loading" non-entry-point code
Date: Mon, 14 Jun 2004 23:56:00 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Daniel B. Faken wrote:
Hi,

Is there a way to initialize scheme code compiled into a shared-library without using entry points?

Specifically, I am already linking against another shared-library that uses entry points, so I can't (?) define them again (unless I maybe keep count of the index..). I'm trying to do this to avoid having yet another shared-library that I need to load - I currently have to link to a common C library (GLUT) AND dynamically-load a scheme binding to that library - but it seems I should be able to just combine them in one.. I suppose I could put a link from /usr/lib/libglut.so to ~faken/lib/chicken/lib/scm-glut-binding.so, but that seems a bit odd. Is there a way to explicitly call the "initialization function" for a module that is already loaded?

(even more specifically, I have a modified version of GLUT and some functions that this modified version depends on are within my scheme code (for the convenience of having the EasyFFI parse the functions). I wish to allow an app that loads GLUT as a normal shared library to have access to another, linked-in, entry-point-defining module, but also to bind
the symbols relavant for the GLUT library)

  Pardon the confusion here.. I'm just a bit confused.


Well, I'm slightly confused, too... ;-)

basically, you want to access two compiled Scheme files in a C application,
right? What you can do is compile one of them with `define-external', and
use the fundamental ##sys#call-host interface.
But perhaps you can explain the problem a bit simpler, since I have some 
problems
understanding what exactly you need.


cheers,
felix




reply via email to

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