Menu

[r635]: / trunk / lispbuilder-net / cffi / library.lisp  Maximize  Restore  History

Download this file

17 lines (13 with data), 711 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
(in-package #:lispbuilder-net-cffi)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun get-library-path (suffix)
(merge-pathnames (concatenate 'string "../bin-" suffix)
(directory-namestring (or *load-truename* *default-pathname-defaults*))))
#+darwin(pushnew (get-library-path "macosx/") cffi:*foreign-library-directories* :test #'equal)
#+win32(pushnew (get-library-path "win32/") cffi:*foreign-library-directories* :test #'equal)
#+unix(pushnew (get-library-path "linux/") cffi:*foreign-library-directories* :test #'equal))
(cffi:define-foreign-library net
(:darwin "libnet.dylib")
(:windows "net.dll")
(:unix "libnet.so"))
(cffi:use-foreign-library net)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.