我最近升级我的OSX到山狮,自从使用Qt Creator的了,我不能编译我的项目。 我得到一堆像下面的错误:
/Users/user/codes/lib/io/xdmfWriter.cpp:63: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available
/Users/user/codes/lib/io/xdmfWriter.cpp:-1: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
/Users/user/codes/lib/io/xdmfWriter.cpp:63: instantiated from here
// xdmfWriter.cpp -- line 63:
gridName << xdmfName_ << "." << timeStep;
gridName
是std::ostringstream
对象和xdmfName_
是std::string
声明为一个私有成员变量xdmfWriter
类,并在类的构造函数初始化。 我以前是没有的......任何想法这个问题?