Howto use Qt with Boost ?
Hello all,
I am using Qt on Windows with MinGW. I added boost library by using INCLUDEPATH in the .pro file and compiled the sample program from boost's Getting Started on Windows.
using namespace boost::lambda;
typedef std::istream_iterator<int> in;
std::for_each(
in(std::cin), in(), std::cout << (_1 * 3) << " " );
Now I receive the errors:
error: `cin' is not a member of `std'
error: `cout' is not a member of `std'
Do namespaces std and boost interfere?
Can I find a tutorial howto use Qt with Boost somewhere?
Re: Howto use Qt with Boost ?
There is no problem using std neither boost with Qt. Just a question of includes and link.
In your sample, be sure to include <iostream> and <algorithm>
Re: Howto use Qt with Boost ?
:o Ok, I focused so much on boost, that I forgot the includes, SORRY for that !!!
Re: Howto use Qt with Boost ?
unless you want to use Boost.Signals, then you need to specify in your .pro file
Code:
CONFIG += no_keywords // for Boost.Signals
and use Q_SIGNALS, S_SLOTS, Q_EMIT etc instead of signals, slots, emit...
HTH