s c h e m a t i c s : c o o k b o o k

/ Cookbook.GettingStartedCollectionSearchPath

This Web


WebHome 
WebChanges 
TOC (with recipes)
NewRecipe 
WebTopicList 
WebStatistics 

Other Webs


Chicken
Cookbook
Erlang
Know
Main
Plugins
Sandbox
Scm
TWiki  

Schematics


Schematics Home
Sourceforge Page
SchemeWiki.org
Original Cookbook
RSS

Scheme Links


Schemers.org
Scheme FAQ
R5RS
SRFIs
Scheme Cross Reference
PLT Scheme SISC
Scheme48 SCM
MIT Scheme scsh
JScheme Kawa
Chicken Guile
Bigloo Tiny
Gambit LispMe
GaucheChez

Lambda the Ultimate
TWiki.org

Changing the Library (Collection) Search Path

Problem

You want to change the path in which PltScheme searches for library (collection) paths.

Solution

There are two main ways of doing this:

  1. Programmatically change the parameter current-library-collections-path
  2. Set the PLTCOLLECTS environment variable

An example of the former that appends the path ../lib to the search path is: 500 Can't connect to 127.0.0.1:8778 (connect: Connection refused)

which will add this path starting from the location of the file where this code appears.

For the second approach, the PLTCOLLECTS environment variable holds a list of paths to search: a string holding paths that are separated by colon (semi-colon on Windows). An empty path in this string indicates where the default collects path goes, so:

Note: Starting from PLT Scheme v301.12, the PLT executables search for the collects path relative to the executable. You can override this using the new -X (or --collects) command-line argument.

Discussion


Comments about this recipe

The first method won't work inside a module - module expands at compile time, while (current-library-collection-paths ...) gets evaluated at run time. In such case only the second approach works.

-- YinSoChen - 21 Apr 2007

Contributors

-- NoelWelsh - 06 May 2006

-- EliBarzilay - 07 May 2006

CookbookForm
TopicType: Recipe
ParentTopic: GettingStartedRecipes
TopicOrder: 999

 
 
Copyright © 2004 by the contributing authors. All material on the Schematics Cookbook web site is the property of the contributing authors.
The copyright for certain compilations of material taken from this website is held by the SchematicsEditorsGroup - see ContributorAgreement & LGPL.
Other than such compilations, this material can be redistributed and/or modified under the terms of the GNU Lesser General Public License (LGPL), version 2.1, as published by the Free Software Foundation.
Ideas, requests, problems regarding Schematics Cookbook? Send feedback.
/ You are Main.guest