9

I am working on a platform with a gcc compiler however boost cannot compile on it.

I am wondering what is the proper way to include the shared_ptr in std:tr1 on gcc? the file i looked in said not to include it directly, from what i can tell no other file includes it either :|

Marc Mutz - mmutz
  • 24,485
  • 12
  • 80
  • 90

3 Answers3

17

In G++ 4.3,

#include <tr1/memory>

should do the trick. You'll find shared_ptr at std::tr1::shared_ptr.

Regexident
  • 29,441
  • 10
  • 93
  • 100
bdonlan
  • 224,562
  • 31
  • 268
  • 324
4

Boost itself has the answer.

Max Lybbert
  • 19,717
  • 4
  • 46
  • 69
3

Boost can not compile on it? Most of the boost library doesn't need to be compiled to be used, and I guess shared_ptr doesn't either.

Gaetano Mendola
  • 1,344
  • 3
  • 12
  • 27