Neuron librarian, 219, as – Echelon Neuron C User Manual

Page 231

Advertising
background image

Neuron C Programmer’s Guide

219

Neuron Librarian

The Neuron librarian is named nlib.exe. You can use the librarian to create and

manage libraries, or to add and remove individual object files to and from an
existing library. A library consists of pure C functions; you cannot include

Neuron C code in a library, with the exception of the pure C code subset of

Neuron C. The librarian is the only tool discussed in this appendix that is not
essential but purely optional; the librarian is not required to produce L

ON

W

ORKS

devices.
You can use the libraries that are created or modified by the librarian within the
NodeBuilder project managers, or with the stand-alone nld.exe Neuron linker.

For using libraries with the stand-alone linker, see the -l and -L commands in the
linker’s command set. For using libraries within the project manager, refer to

the

NodeBuilder FX User's Guide

.

You can run the librarian from the command prompt by specifying the name of
the command, an optional set of switches, the library name, and an optional list

of object file names.
To create a new library, enter the following command line:

C:\>nlib -c -a

library-name

object-file

[

object-file

...]

To add modules to an existing library, enter the following command line:

C:\>nlib -a

library-name

object-file

[

object-file

...]

To replace (or update) existing modules in an existing library, enter the following

command line:

C:\>nlib -u

library-name

object-file

[

object-file

...]

To report on the contents of an existing library, enter the following command.

The report is output on the console, but can be redirected to a file.

C:\>nlib -r

library-name

To create a summary report, enter the following command line:

C:\>nlib -s

library-name

For example, the command shown below uses the long form switch and adds the

zorro.no and garcia.no object files to the mylib.lib library:

C:\>nlib - -add mylib.lib zorro.no garcia.no

You can use script files to specify inputs to the librarian. For example, to

combine the ten object files named “f1.no” through “f10.no” into a mylib.lib

library, enter the following command line and command file:

C:\>nlib -c2 -a mylib.lib @mylib.lst

The contents of the mylib.lst file are as follows:

f1.no

f2.no

f3.no
f4.no

f5.no

f6.no
f7.no

Advertising