Boost logo

Boost Users :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-08-08 15:24:53


AMDG

Olaf Peter wrote:
> Hi,
>
> I perform some tests and run into problems. The following code doesn't
> compile:
>
> ---8<---
> #include <boost/python.hpp>
>
> boost::function<void (My*)> exec_test = &My::exec_test; //L13
>
> --->8---
>
> $ LANG=en g++ -I /usr/include/python2.5 python_embedded.cpp -o
> python_embedded -l python2.5 -l boost_python
> python_embedded.cpp: In function 'int main()':
> python_embedded.cpp:13: error: variable 'boost::function<void ()(My*),
> std::allocator<void> > exec_test' has initializer but incomplete type
>

Add

#include <boost/function.hpp>

In Christ,
Steven Watanabe


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