[Openmcl-devel] pathname problem with open-shared-library?

Rick Taube taube at uiuc.edu
Mon Nov 22 07:56:06 PST 2004

Directory seems to add "\\" to pathnames when there is more than one 
dot in the pathname but then this causes problems when you attempt to 
pass that string programmatically to open-shared-library:
Welcome to OpenMCL Version (Beta: Darwin) 0.14.1-p1!

? (setq l (directory "/sw/lib/libgtk-x11-2.*.dylib"))

? (open-shared-library (namestring (car l)))
 > Error in process listener(1): Error opening shared library 
"/sw/lib/libgtk-x11-2\\.0\\.0\\.200\\.4.dylib": dyld: /Lisp/ccl/dppccl 
can't open library: /sw/lib/libgtk-x11-2\.0\.0\.200\.4.dylib  (No such 
file or directory, errno = 2)
 > While executing: OPEN-SHARED-LIBRARY
 > Type :POP to abort.
Type :? for other options.
1 > :pop

However, probe-file can deal with quoted multi-dots:

(probe-file #P"/sw/lib/libgtk-x11-2\\.0\\.0\\.200\\.4.dylib")

AND open-shared-library can handle the unquoted multi-dot version:

? (open-shared-library "/sw/lib/libgtk-x11-")
#<SHLIB /sw/lib/libgtk-x11- #x5396426>

AND pathname-type can deal with multiple dots!:

? (pathname-type "/sw/bin/libgtk-x11-2.0.0.dylib")

What is the correct way for me to deal with such pathnames? Actually, I 
dont really understand why directory gets all nervous about multi-dots 
in the first place, it seems that other openmcl funcions either dont 
need them or can handlle them.

Rick Taube
Associate Professor, Composition/Theory
School of Music
University of Illinois
Urbana, IL 61821 USA
net: taube at uiuc.edu
fax: 217 244 8319
vox: 217 244 2684

More information about the Openmcl-devel mailing list