I have a new problem with my code swig.
I've a file .h, this file calls a libraries, this libraries is in other
directori, when i compile my code swig i have error because don't find this
When I compile
swig -l/home/../libraries -python -c++ example.i
c++ -c example_wrap.cxx -I/usr/include/python2.4
../example.h:35:47: external/bilib/types/tsplinebasis.h: No exist the file
../example.h:36:54: external/bilib/types/tboundaryconvention.h:No exist the
file or directori
../example.h:37:50: external/bilib/headers/linearalgebra.h: No exist the
file or directori
../example.h:38:48: external/bilib/headers/changebasis.h: No exist the file
../example.h:39:43: external/bilib/headers/kernel.h: No exist the file or
I don't know import this libraries. I possible include the libraries?
david rodriguez martinez wrote:
> I don't know import this libraries. I possible include the libraries?
This is just a compiler issue, not a swig issue.
Use your compiler's -I/path/include flag to indicate where the root of
those files is. That will get rid of your compile error. Also, if your
library is not just a bunch of template .h files, you will likely also
need to add a -L/path/lib to the compile line and a -llibrary flag to
indicate the library to link against (a .so or .a file on unix systems
). For more info, google for C++ include and static and dynamic libraries.
To wrap those classes or functions in the .h files, swig will also
probably need a similar -I flag (not -l as you typed) and the #include
directive for swig must be matched by a similar %include directive.
For more info about #include vs %include, refer to the manual. You
will also likely need to do some %typemap conversions for any arrays
used (like in the spline functions). For more info about %typemap,
refer to the swig manual.
AMD4400 - ASUS48N-E