New to OSLib

Erik Groenhuis e.groenhuis at xs4all.nl
Mon Oct 29 09:32:24 GMT 2007


As Adam wrote on 27 Oct 2007:

> In message <f82057384f.steve at helvellyn.stevefryatt.org.uk>, Steve
> Fryatt wrote:
> 
> > You want to add OSLib: to your include path (such as by adding
> > -IOSLib: to your compile parameters -- at least with GCC).  Then
> > access the headers in the form
> > 
> >   #include "oslib/header.h"
> > 
> > in your source.
> 
> Thanks, though I wanted to avoid having all the oslib headers on the
> include path since I figured it'll just increase the potential for
> name clashes a lot :(

There will not be a clash in header file names. Exactly for this reason
the OSLib headers must be included in the form "oslib/header.h".

So if you use, for instance, #include "os.h", this file will *never* be
read from the OSLIB: path. To get the OSLIB include file of this name,
use #include "oslib/os.h".

Name clashes between Desklib and OSLib *symbols* wich are in the header
files you do include is a different matter and can lead to significant
problems. It helps to only include the headers you need in each of your
source files :-)

-- 
Erik Groenhuis http://www.xs4all.nl/~erikgrnh
=== http://www.irregularwebcomic.net/ ===



More information about the oslib-user mailing list