Is there any particular reason that I am not able to run the a program using std_lib_facilities.h?
Closed this issue · 0 comments
abhi-infrrd commented
System : Debian, Ubuntu 18.10, clion-2018.1.2
Source code :
#include "std_lib_facilities.h"
int main(){
cout<<"Hello world\n";
}
CMakeLists.txt :
cmake_minimum_required(VERSION 3.10)
project(ppu_cpp)
set(CMAKE_CXX_STANDARD 11)
add_executable(ppu_cpp main.cpp std_lib_facilities.h)
Error :
/home/abhi/Desktop/clion-2018.1.2/bin/cmake/bin/cmake --build /home/abhi/Desktop/ppu-cpp/cmake-build-debug --target ppu_cpp -- -j 2
[ 50%] Building CXX object CMakeFiles/ppu_cpp.dir/main.cpp.o
In file included from /usr/include/c++/7/ext/hash_map:60:0,
from /home/abhi/Desktop/ppu-cpp/std_lib_facilities.h:34,
from /home/abhi/Desktop/ppu-cpp/main.cpp:1:
/usr/include/c++/7/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
#warning \
^~~~~~~
In file included from /usr/include/c++/7/locale:41:0,
from /usr/include/c++/7/iomanip:43,
from /home/abhi/Desktop/ppu-cpp/std_lib_facilities.h:212,
from /home/abhi/Desktop/ppu-cpp/main.cpp:1:
/usr/include/c++/7/bits/locale_facets_nonio.h:1971:5: error: template-id 'do_get<>' for 'String std::__cxx11::messages<char>::do_get(std::messages_base::catalog, int, int, const String&) const' does not match any template declaration
messages<char>::do_get(catalog, int, int, const string&) const;
^~~~~~~~~~~~~~
/usr/include/c++/7/bits/locale_facets_nonio.h:1971:62: note: saw 1 'template<>', need 2 for specializing a member function template
messages<char>::do_get(catalog, int, int, const string&) const;
^~~~~
CMakeFiles/ppu_cpp.dir/build.make:62: recipe for target 'CMakeFiles/ppu_cpp.dir/main.cpp.o' failed
make[3]: *** [CMakeFiles/ppu_cpp.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ppu_cpp.dir/all' failed
make[2]: *** [CMakeFiles/ppu_cpp.dir/all] Error 2
CMakeFiles/Makefile2:79: recipe for target 'CMakeFiles/ppu_cpp.dir/rule' failed
make[1]: *** [CMakeFiles/ppu_cpp.dir/rule] Error 2
Makefile:118: recipe for target 'ppu_cpp' failed
make: *** [ppu_cpp] Error 2