|
Boost Users : |
Subject: [Boost-users] boost python macro hell
From: Neal Becker (ndbecker2_at_[hidden])
Date: 2010-01-14 10:42:30
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.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net