From: William S F. <ws...@fu...> - 2005-11-30 22:51:36
|
Ken Nguyen wrote: > > I'm having problem getting SWIG to recognize system macros, like > __x86_64. I have the following lines of code... > > #if defined(__x86_64) || defined(__x86_64__) || defined(_linux_) > > typedef long type2; > > #endif > > I'm on a linux_x86_64 machine and I think those macros are defined by > the system. I'm trying to get the SWIG's preprocessor to recognize > those macros, but with no luck. Any ideas? > > any advice is greatly appreciated.. > This won't work. SWIG will generate the same code on every single platform. What you must do is generate this platform specific stuff into the generated code. Then the same swig generated source will work on many platforms. William |