C3D icon indicating copy to clipboard operation
C3D copied to clipboard

Make all fails at examples/mnist/convert_mnist_data.cpp

Open Anirudh58 opened this issue 5 years ago • 2 comments

Running make all fails at this step.

I am running ubuntu 18.04, OpenCV 3. I have made all the required changed to the Makefile.config file. Please let me know if i am missing something.

examples/mnist/convert_mnist_data.cpp:31:47: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream’ and ‘std::ifstream {aka std::basic_ifstream}’) CHECK(label_file) << "Unable to open file " << label_file; ^ examples/mnist/convert_mnist_data.cpp:31:47: note: candidate: operator<<(int, int) examples/mnist/convert_mnist_data.cpp:31:47: note: no known conversion for argument 2 from ‘std::ifstream {aka std::basic_ifstream}’ to ‘int’ In file included from /usr/include/glog/logging.h:43:0, from examples/mnist/convert_mnist_data.cpp:11: /usr/include/c++/7/ostream:108:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& ()(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream] operator<<(__ostream_type& (__pf)(__ostream_type&)) ^~~~~~~~ /usr/include/c++/7/ostream:108:7: note: no known conversion for argument 1 from ‘std::ifstream {aka std::basic_ifstream}’ to ‘std::basic_ostream::__ostream_type& ()(std::basic_ostream::__ostream_type&) {aka std::basic_ostream& ()(std::basic_ostream&)}’ /usr/include/c++/7/ostream:117:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& ()(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios] operator<<(__ios_type& (__pf)(__ios_type&))

Anirudh58 avatar Apr 10 '19 14:04 Anirudh58

Hi, have u solve this problem? I have the same error.

hali6779 avatar May 28 '19 14:05 hali6779