2012-08-19 09:11:45 -0600 | commented answer | OpenCV on Mac OS X 10.8 Mountain Lion Hi mjepson, thanks a lot. The solution posted by natoferreira works for me. Answering your question, I indeed was able to compile and run the code using string.c_str(). Regards. |
2012-08-08 08:32:42 -0600 | answered a question | OpenCV on Mac OS X 10.8 Mountain Lion Hi there!! I'm having the very same problem reported by mjepson: 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 caused by a "cout" call. the very same project was working smoothly before updating to mountain lion. ENVIRONMENT: IDE: QtCreator 2.4.1 based on qt 4.7.4 (64 bit) Platform macbook pro 2.2ghz early 2011 with mountain lion (osx 10.8). Xcode version 4.4.1 I installed the command line tools using Xcode. Uninstalled and re-installed the Qt so it automatically found the compilers toolchains but nothing worked. Curiously, if I add cout << myString.c_str(); The problem is solved both for compilation and running. I'd rather find out what's the problem, though. Regards. |