On Tue, 11 Nov 2008, Michael Gerbracht wrote:

What I did:
- Download the source code of the library
- Installed gcc and tested it with the "hello world" example - it compiled
- I made a new directory, set it as work directory
- added "c" and "h" directories, copied the files into it and removed the
 /c and /h ending

If you checked the sources out using SVN, then this should have been done automatically.

- trying to compile with: "gcc pencil_build.c -o penciltest"

This won't work, as you've discovered. You're only building one of the library source files here. pencil_test.c is the source file for the test binary.

Something like:

gcc -std=c99 -I<NSLibs$Dir>/include -c pencil_build.c -o pencil_build.o
gcc -std=c99 -I<NSLibs$Dir>/include -c pencil_save.c -o pencil_save.o
ar -cr libpencil.a pencil_build.o pencil_save.o

will give you the library.

And:

gcc -std=c99 -I<NSLibs$Dir>/include -L<NSLibs$Dir>/lib -lOSLib32 -lrufl -o pencil_test pencil_test.c libpencil.a

will give you the test binary.

Alternatively, there's a pre-built libpencil in NSTools.



John.

Reply via email to