From: Joeish W <joe...@ya...> - 2013-09-06 06:14:53
|
1. for example I'm trying to wrap opencv's opencv-2.4.6.1/modules/core/src/array.cpp file and my interface file is like this: %module test %include "array.cpp" now array.cpp has #include precomp.hpp in it and precomp.hpp has all these includes in it: #include "opencv2/core/core.hpp" #include "opencv2/core/core_c.h" #include "opencv2/core/internal.hpp" #include <assert.h> #include <ctype.h> #include <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> How can I easily include all of these files without tracking down each one and moving it into the same folder and changing all the #include <array.cpp> (for example) to: #include "array.cpp" I'm on Ubuntu 13.10 Saucy Salamander = ) do I do it with environment variables...and if so can you give me precise step by step instructions as to how...I'm new to Ubuntu coming from being a Windows Master...but still very good at Ubuntu save for not understanding its environment variables as well as Windows 8 p.s. I tried adding the -importall parameter and I get array.cpp:49: Error: Unable to find 'precomp.hpp' I'd like to know how I can make swig on ubuntu 13.10 automatically find the header files so I don't have to find them all and put in same folder p.s. 2 I ended up putting all my header files in one folder after using "locate" in terinal to find them.....now I get assert.h:71: Error: Syntax error in input(1). on these lines and if I remove these lines I keep getting errors ....is there a way to make swig skip all errors and compile whatever it can....I got alot of the header files i collected from a c++ directory... extern void __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __THROW __attribute__ ((__noreturn__)); /* Likewise, but prints the error text for ERRNUM. */ extern void __assert_perror_fail (int __errnum, const char *__file, unsigned int __line, const char *__function) __THROW __attribute__ ((__noreturn__)); |