Guest User

Untitled

a guest
Jun 26th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. In file included from main.cpp:1:
  2. ./shared_ptr.h:13:18: warning: in-class initialization of non-static data member
  3. is a C++11 extension [-Wc++11-extensions]
  4. int count=0;
  5. ^
  6. ./shared_ptr.h:30:19: warning: instantiation of variable
  7. 'shared_ptr<int>::setOfPointers' required here, but no definition is
  8. available [-Wundefined-var-template]
  9. for(int i=0;i<setOfPointers.size();i++){
  10. ^
  11. main.cpp:4:21: note: in instantiation of member function
  12. 'shared_ptr<int>::shared_ptr' requested here
  13. shared_ptr<int> shp(new int(10));
  14. ^
  15. ./shared_ptr.h:16:38: note: forward declaration of template entity is here
  16. static std::vector< storage<T> > setOfPointers;
  17. ^
  18. 2 warnings generated.
  19. Undefined symbols for architecture x86_64:
  20. "shared_ptr<int>::setOfPointers", referenced from:
  21. shared_ptr<int>::shared_ptr(int*) in main-c9b010.o
  22. shared_ptr<int>::~shared_ptr() in main-c9b010.o
  23. ld: symbol(s) not found for architecture x86_64
  24. clang: error: linker command failed with exit code 1 (use -v to see invocation)
Add Comment
Please, Sign In to add comment