
14 Jan
2010
14 Jan
'10
3:42 p.m.
Probably OT, but I'm trying to generate modules programmatically. Each module with be generated using -DSIMCASE=n and will create a module called ldpc_n.so. I can't get this macro to work, this is my latest try: #define SIMCASE 10 #define NAME ldpc_ ## SIMCASE #define MODULE_START BOOST_PYTHON_MODULE (NAME) Later I have: MODULE_START { ... } Results in: In file included from ldpc_x.cc:12: ldpc.cc: In function 'void initldpc_SIMCASE()': ldpc.cc:100: error: 'init_module_ldpc_SIMCASE' was not declared in this scope Looks like 2 problems there: 1 is that 'SIMCASE' did not have it's #defined value substituted, second is that (as evidenced by the error) this interacted wierdly with the BOOST_PYTHON_MODULE macro.