Re: How to create a symbolic link?
Pascal Bourguignon <[email protected]>
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
> On 16 Dec 2016, at 07:37, Jean Louis <[email protected]> wrote: > > Hello, > > Thank you. Do I miss some configuration on my clisp? > > I get error: > FFI::FIND-FOREIGN-FUNCTION: foreign function "symlink" does not exist > > On Fri, Dec 16, 2016 at 02:59:35AM +0100, Pascal Bourguignon wrote: >> You can use FFI to call symlink(2). >> >> >> C/USER[14]> (ffi:def-call-out symlink >> (:name "symlink") >> (:arguments (p1 ffi:c-string :in) (p2 ffi:c-string :in)) >> (:return-type ffi:int) >> (:language :stdc)) > > > Jean Louis You need to compile it with the bindings/glibc module. It’s only available on Linux. On other systems you could to write a little stub library that would implement a create_symbolic_link function that would call symlink(2), and dynamically load it with FFI, or you could write an equivalent of bindings/glibc for your system (there’s one for MS-Windows, IIRC, but of course, no symlinks on MS-Windows). -- __Pascal J. Bourguignon__ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list