Re: [sigc] Build failed



2013-03-07 15:05, Chris Vine skrev:
On Thu, 07 Mar 2013 10:35:42 +0100
Kjell Ahlstedt <kjell ahlstedt bredband net> wrote:
If libsigc++ can't be built on Mac OS X I'd like to know why, and
what can be done about it.
The error messages says that no definition is available for
std::basic_ostream<>& std::operator<<(std::basic_ostream<>&, const
std::basic_string<>&).
I thought #include <iostream> should fix that. Is any other include
file necessary in OS X?
You can try with removing the SIGC_USING_STD macros. They are
unnecessary since many years. But I'd be surprised if it fixes your
problem.
Including <ostream>, which is where std::ostream/std::basic_ostream are
defined, may do it.  C++98 only requires <iostream> to declare the
standard stream objects (not classes) (§27.3), which I guess it could
do by only including <iosfwd>.  <ostream> is also where operator::<<()
for stream objects is declared.  <istream> defines the
std::istream/std::iostream/std::basic_istream/std::basic_iostream
classes and templates and declares operator::>>().

C++11 seems to require <iostream> to include <ostream> (§27.4.1), so
the -std=c++0x compiler flag may also have the desired effect.

Chris

Hi Maxime,

Any progress? If libsigc++ must be changed in order to build it on Mac OS X, I recommend that you file a bug in Bugzilla. But I will need your help to test the changes. I have no access to a computer with OS X.

Kjell



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]