#905 #include directives don't expand macros as arguments.

closed-fixed
5
2011-02-13
2008-03-28
No

Hello,
I'm trying to wrap boost::intXX_t types from boost/cstdint.hpp and I'm having problems with #include directives as used in boost headers.

The problem reduces to the fact the following source file fails to be parsed by swig:

%module XXX

#define STDIO "stdio.h"
#include STDIO

when compiled with -importall it says:
testfile.i:5: Error: Unable to find 'STDIO'

I don't know if a ISO C compliant preprocessor is required to expand macro definitions inside an include directive but as I can see that code in boost/config.hpp header I'd bet yes.

Thanks and regards,
Juan

Discussion

  • William Fulton

    William Fulton - 2011-02-13
    • assigned_to: nobody --> wsfulton
    • status: open --> closed-fixed
     
  • William Fulton

    William Fulton - 2011-02-13

    Fixed for swig-2.0.2.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks