I have a 3rd party product which is meant to be linked with a user's c
applications. The product supplies a header file ("foo.h") for
inclusion and a pre-compiled object file ("libfoo.a") to link with.
Naturally, I'd like to expose the api to tcl so I can develop
applications much quicker.
I've managed to build a swig "wrapper" file by simply using the
header:
swig -tcl8 -module foo foo.h
which produced:
foo_wrap.c
So far, so good. Now, I'd like to use foo_wrap.c to compile/link with
the libfoo.a object file. I've read the swig docs, and tried several
variations. So far, I only get compiler errors:
gcc -c foo_wrap.c -I /usr/include/tcl8.4 -I ~/fooproject/include -L ~/
fooproject/lib/libdfftr.a
.
.
.
foo_wrap.c:4181: error: 'FOO_OBJECT_NOT_ACTIVE' undeclared (first use
in this function)
Any ideas what I'm doing wrong?
Thanks for your time,
-T