We always use libsbml with the C++ namespace, this is the only way to avoid name collisions with commonly used terms such as "Parameter".
The python bindings however will not build with the namespace enabled, and we need to share a pointer to various libsbml objects between C++ and Python, so building one version of libsbml without namespace for Python and another with namespace for C++ will not work.
I just tried a clean build, from
libsbml-experimentalon WIN32 using python 3.2 (32 bit) and C++ Namespace enabled. That worked just fine.So it would be nice if you could provide more information. Especially your CmakeCache.txt file. And all information about the system you are running on.
Thanks
Frank
This is building the libSBML-5.10.2-experimental release. Trying to build (On OSX 10.7) against Python 2.6 (yes, its ancient, but lots of users still use it).
I didn't try it, but I'd guess that adding the libsbml:: namespace before the class names should work.
Can you please also verify, that the
libsbml-namespace.his read from the libSBML binary dir insrc/sbml/common/(and that it has the statement#define LIBSBML_USE_CPP_NAMESPACE 1) in there?(This could be easily achieved by an #error statement in the file).
This error could be caused, by a conflicting file on your system. In old versions of libSBML, that file was part of the
src/sbml/commondir, which would cause the problem.Closing this as there has been no further response