I was trying to write a python extension using Boost.Python and accelerate with CUDA. But I got a compiler error simply by compiling a file that includes the Boost.Python library:
// test.cu
#include <boost/python.hpp>
I compile it with
nvcc test.cu -c -o test.o -ccbin /usr/bin/clang -DNVCC \
-I/Developer/NVIDIA/CUDA-7.0/include -I/opt/local/include \
-I/opt/local/Library/Frameworks/Python.framework/Headers
The following error appears
/opt/local/include/boost/python/args.hpp:88:29: error: return type of out-of-line
definition of 'boost::python::detail::keywords_base::operator,' differs
from that in the declaration
keywords_base< nkeywords> ::operator,(const arg &k) const
^
/opt/local/include/boost/python/args.hpp:52:35: note: previous declaration is
here
inline keywords< nkeywords + 1UL> operator,(const arg & k) const;
^
/opt/local/include/boost/python/args.hpp:100:29: error: return type of
out-of-line definition of 'boost::python::detail::keywords_base::operator,'
differs from that in the declaration
keywords_base< nkeywords> ::operator,(const char *name) const
^
/opt/local/include/boost/python/args.hpp:55:35: note: previous declaration is
here
inline keywords< nkeywords + 1UL> operator,(const char * name) const;
^
I am using Boost.Python version 1.57 and python version 2.7.9, both installed with MacPorts. My CUDA toolkit version is 7.0.
Thanks in advance for your help!