Bug 92868 - test (importtest.cpp) fails to compile on OS X w/ clang (call to function operator<<)
Summary: test (importtest.cpp) fails to compile on OS X w/ clang (call to function ope...
Status: RESOLVED FIXED
Alias: None
Product: Document Liberation Project
Classification: Unclassified
Component: libvisio (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: David Tardon
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-22 10:23 UTC by Hanspeter Niederstrasser
Modified: 2017-10-30 11:43 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hanspeter Niederstrasser 2015-07-22 10:23:11 UTC
On OS X 10.9/Xcode 6.2/libvisio-0.1.1, importtest.cpp fails to compile with this error:

g++ -DHAVE_CONFIG_H -I. -I../..  -DTDOC=\"../../src/test/data\" -I/sw/opt/boost-1_58/include -I/sw/include -I../../inc -I/sw/include/librevenge-0.0  -I/sw/include/libxml2 -I/sw/include  -I/sw/include  --std=c++0x -I/sw/include/librevenge-0.0  -I/sw/include  -DNDEBUG -g -O2 -fvisibility=hidden -DLIBVISIO_VISIBILITY -Wall -Wextra -Wshadow -pedantic -MT test-importtest.o -MD -MP -MF .deps/test-importtest.Tpo -c -o test-importtest.o `test -f 'importtest.cpp' || echo './'`importtest.cpp
In file included from importtest.cpp:13:
In file included from /sw/include/cppunit/extensions/HelperMacros.h:9:
In file included from /sw/include/cppunit/TestCaller.h:5:
In file included from /sw/include/cppunit/TestCase.h:6:
/sw/include/cppunit/TestAssert.h:49:13: error: call to function 'operator<<' that is neither visible in the template definition nor found by argument-dependent lookup
        ost << x;
            ^
/sw/include/cppunit/TestAssert.h:101:50: note: in instantiation of member function 'CppUnit::assertion_traits<librevenge::RVNGString>::toString' requested here
    Asserter::failNotEqual( assertion_traits<T>::toString(expected),
                                                 ^
importtest.cpp:66:3: note: in instantiation of function template specialization 'CppUnit::assertEquals<librevenge::RVNGString>' requested here
  CPPUNIT_ASSERT_EQUAL_MESSAGE(message.cstr(), expectedValue, actualValue);
  ^
/sw/include/cppunit/TestAssert.h:214:17: note: expanded from macro 'CPPUNIT_ASSERT_EQUAL_MESSAGE'
  ( CPPUNIT_NS::assertEquals( (expected),              \
                ^
importtest.cpp:20:15: note: 'operator<<' should be declared prior to the call site or in namespace 'librevenge'
std::ostream &operator <<(std::ostream &s, const librevenge::RVNGString &string)
              ^
1 error generated.
Makefile:680: recipe for target 'test-importtest.o' failed
make[3]: *** [test-importtest.o] Error 1