Skip to content

build error: ‘shared_ptr’ in namespace ‘boost’ does not name a template type #2

@doctorcolossus

Description

@doctorcolossus

Hello! I am interested in building this program but am encountering the following error.
Does anyone have any ideas or suggestions? Thank you.

$ cmake .
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found suitable version "1.78.0", minimum required is "1.47") found components: filesystem system
-- Configuring done
-- Generating done
-- Build files have been written to: ./ics2rem

$ make
[ 25%] Building CXX object src/CMakeFiles/ics2rem_lib.dir/Ics.cpp.o
In file included from ./ics2rem/src/Ics.cpp:3:
./ics2rem/src/IcalComponent.hpp:16:22: error: ‘shared_ptr’ in namespace ‘boost’ does not name a template type
   16 |       typedef boost::shared_ptr< icalcomponent > c_ptr;
      |                      ^~~~~~~~~~
./ics2rem/src/IcalComponent.hpp:23:23: error: expected ‘)’ before ‘self’
   23 |       Component( c_ptr self )
      |                ~      ^~~~~
      |                       )
./ics2rem/src/IcalComponent.hpp:69:7: error: ‘c_ptr’ does not name a type
   69 |       c_ptr self;
      |       ^~~~~
./ics2rem/src/IcalComponent.hpp: In constructor ‘ical::Component::Component(icalcomponent*)’:
./ics2rem/src/IcalComponent.hpp:19:12: error: class ‘ical::Component’ does not have any field named ‘self’
   19 |          : self( self, & icalcomponent_free )
      |            ^~~~
./ics2rem/src/IcalComponent.hpp: In copy constructor ‘ical::Component::Component(const ical::Component&)’:
./ics2rem/src/IcalComponent.hpp:29:12: error: class ‘ical::Component’ does not have any field named ‘self’
   29 |          : self( self.self )
      |            ^~~~
./ics2rem/src/IcalComponent.hpp:29:23: error: ‘const class ical::Component’ has no member named ‘self’
   29 |          : self( self.self )
      |                       ^~~~
./ics2rem/src/IcalComponent.hpp: In member function ‘ical::Component::operator bool()’:
./ics2rem/src/IcalComponent.hpp:35:17: error: ‘self’ was not declared in this scope
   35 |          return self.get() != NULL;
      |                 ^~~~
./ics2rem/src/IcalComponent.hpp: In member function ‘std::string ical::Component::asIcalString()’:
./ics2rem/src/IcalComponent.hpp:40:56: error: ‘self’ was not declared in this scope
   40 |          char * temp = icalcomponent_as_ical_string_r( self.get() );
      |                                                        ^~~~
./ics2rem/src/IcalComponent.hpp: In member function ‘ical::Component ical::Component::getInner()’:
./ics2rem/src/IcalComponent.hpp:48:42: error: ‘self’ was not declared in this scope
   48 |          return icalcomponent_get_inner( self.get() );
      |                                          ^~~~
./ics2rem/src/IcalComponent.hpp: In member function ‘ical::Time ical::Component::getDTStart()’:
./ics2rem/src/IcalComponent.hpp:52:44: error: ‘self’ was not declared in this scope
   52 |          return icalcomponent_get_dtstart( self.get() );
      |                                            ^~~~
./ics2rem/src/IcalComponent.hpp: In member function ‘ical::Time ical::Component::getDTEnd()’:
./ics2rem/src/IcalComponent.hpp:56:42: error: ‘self’ was not declared in this scope
   56 |          return icalcomponent_get_dtend( self.get() );
      |                                          ^~~~
./ics2rem/src/IcalComponent.hpp: In member function ‘ical::Duration ical::Component::getDuration()’:
./ics2rem/src/IcalComponent.hpp:60:45: error: ‘self’ was not declared in this scope
   60 |          return icalcomponent_get_duration( self.get() );
      |                                             ^~~~
./ics2rem/src/IcalComponent.hpp: In member function ‘std::string ical::Component::getSummary()’:
./ics2rem/src/IcalComponent.hpp:64:44: error: ‘self’ was not declared in this scope
   64 |          return icalcomponent_get_summary( self.get() );
      |                                            ^~~~
In file included from ./ics2rem/src/Ics.cpp:4:
./ics2rem/src/IcalParser.hpp: At global scope:
./ics2rem/src/IcalParser.hpp:56:13: error: field ‘myParser’ has incomplete type ‘ical::Parser::c_ptr’ {aka ‘boost::shared_ptr<icalparser_impl>’}
   56 |       c_ptr myParser;
      |             ^~~~~~~~
In file included from /usr/include/boost/throw_exception.hpp:23,
                 from /usr/include/boost/function/detail/prologue.hpp:15,
                 from /usr/include/boost/function.hpp:30,
                 from ./ics2rem/src/IcalParser.hpp:10,
                 from ./ics2rem/src/Ics.cpp:4:
/usr/include/boost/exception/exception.hpp:16:44: note: declaration of ‘ical::Parser::c_ptr’ {aka ‘class boost::shared_ptr<icalparser_impl>’}
   16 | namespace boost { template <class T> class shared_ptr; }
      |                                            ^~~~~~~~~~
./ics2rem/src/Ics.cpp: In function ‘void parseFile(const boost::filesystem::path&)’:
./ics2rem/src/Ics.cpp:57:15: error: ‘cout’ is not a member of ‘std’
   57 |          std::cout << "REM " << dtstart.day
      |               ^~~~
./ics2rem/src/Ics.cpp:7:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
    6 | #include <iomanip>
  +++ |+#include <iostream>
    7 | #include <sstream>
./ics2rem/src/Ics.cpp:66:21: error: ‘cout’ is not a member of ‘std’
   66 |                std::cout << " *1";
      |                     ^~~~
./ics2rem/src/Ics.cpp:66:21: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./ics2rem/src/Ics.cpp:73:18: error: ‘cout’ is not a member of ‘std’
   73 |             std::cout << " AT " << dtstart.hour << ':';
      |                  ^~~~
./ics2rem/src/Ics.cpp:73:18: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./ics2rem/src/Ics.cpp:75:21: error: ‘cout’ is not a member of ‘std’
   75 |                std::cout << '0';
      |                     ^~~~
./ics2rem/src/Ics.cpp:75:21: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./ics2rem/src/Ics.cpp:76:18: error: ‘cout’ is not a member of ‘std’
   76 |             std::cout << dtstart.minute;
      |                  ^~~~
./ics2rem/src/Ics.cpp:76:18: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./ics2rem/src/Ics.cpp:85:21: error: ‘cout’ is not a member of ‘std’
   85 |                std::cout << " UNTIL "
      |                     ^~~~
./ics2rem/src/Ics.cpp:85:21: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./ics2rem/src/Ics.cpp:95:21: error: ‘cout’ is not a member of ‘std’
   95 |                std::cout << " DURATION " << hours << ':';
      |                     ^~~~
./ics2rem/src/Ics.cpp:95:21: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./ics2rem/src/Ics.cpp:97:24: error: ‘cout’ is not a member of ‘std’
   97 |                   std::cout << '0';
      |                        ^~~~
./ics2rem/src/Ics.cpp:97:24: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./ics2rem/src/Ics.cpp:98:21: error: ‘cout’ is not a member of ‘std’
   98 |                std::cout << minutes;
      |                     ^~~~
./ics2rem/src/Ics.cpp:98:21: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./ics2rem/src/Ics.cpp:103:15: error: ‘cout’ is not a member of ‘std’
  103 |          std::cout << " MSG %\"" << c.getSummary() << "%\"";
      |               ^~~~
./ics2rem/src/Ics.cpp:103:15: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./ics2rem/src/Ics.cpp:107:18: error: ‘cout’ is not a member of ‘std’
  107 |             std::cout << " %3";
      |                  ^~~~
./ics2rem/src/Ics.cpp:107:18: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
./ics2rem/src/Ics.cpp:110:15: error: ‘cout’ is not a member of ‘std’
  110 |          std::cout << std::endl;
      |               ^~~~
./ics2rem/src/Ics.cpp:110:15: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
make[2]: *** [src/CMakeFiles/ics2rem_lib.dir/build.make:76: src/CMakeFiles/ics2rem_lib.dir/Ics.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: src/CMakeFiles/ics2rem_lib.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions