Re: Using shared objects
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jun 03, 2005
- 552 views
On Thu, 02 Jun 2005 13:29:46 -0700, Ron Weidner <guest at RapidEuphoria.com> wrote: >I have some shared object written in C. Below is the code. Not entirely sure precisely what you mean by "shared object".. >What I want is to write a euphoria include that maps the >shared object to euphoria. The code below may or may not help. > >What I'd like even more is if the share object could be >distributed as part of the project and not necessarily >"installed" on the host. (ie... no ldconfig). My understanding of that is you want a file called dog.e that you can include in multiple projects rather than a dog.dll (or dog.so) which needs to be installed separately? > <snip> > mush({"scooby", "dino", "astro", "spike"}) --notice the absence of arg 2 The code below does not pass a length, is that what/all you meant?
--dog.e global procedure mush(sequence dogs) integer len len=length(dogs) printf(1,"Number of dogs: %d \n", len ) for i=1 to len do printf(1,"Dog named: %s starts mushing...\n", {dogs[i]}) end for end procedure global function bark() return 1 end function -- end of dog.e -- include dog.e if atom(bark()) then mush({"scooby", "dino", "astro", "spike"}) end if
Regards, Pete