using swig/tcl for 3rd party packages



Hi,

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

.



Relevant Pages

  • Global Instance
    ... (ie declaring it in my applications main header file for use in seperate C++ ... mclient.h (the header file containing the global definition of g_hInst). ...
    (microsoft.public.pocketpc.developer)
  • Re: Win32-API function calls in VS2005 CLR applications
    ... I was talking of C++/CLI applications. ... David Lowndes schrieb: ... using windows.h or a similar header file: ... C++/CLI is a much cleaner solution. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Porting OpenBSD app to Solaris
    ... sys/cdefs.h is not a standard "Unix" header file so generally not ... available on Solaris. ... Applications should not be including it ...
    (comp.unix.solaris)
  • Re: VS2003 crashes when debugging
    ... I would suspect a 3rd party product (VS addin, hook DLL, etc.). ... applications to see if that could be the case. ...
    (microsoft.public.vc.debugger)