Undefined symbols for architecture i386:


#1

Hi, 

I’ve followed the quick start tutorial instructions, added the frameworks:

  • Security.framework (Trial Version only)
  • QuartzCore.framework
  • OpenGLES.framework
  • CoreText.framework
  • libstdc++.dylib

and got many build errors. Looking at other posts there are suggestions to replace libstdc++.dylib with libstdc++.6.0.9.dylib which is what I did but am still getting errors.

The build phases tab references  libstdc++.6.0.9.dylib. Not sure what else I need to be doing. Any help would be appreciated. Thanks in advance.

See below:

Undefined symbols for architecture i386:
  "std:: __1::__ vector_base_common<true>::__throw_length_error() const", referenced from:
      void std:: __1::vector<SChartGL::RenderData, std::__ 1::allocator<SChartGL::RenderData> >::__push_back_slow_path<SChartGL::RenderData const&>(SChartGL::RenderData const&&&) in ShinobiCharts(ShinobiCharts)
      void std:: __1::vector<SChartGL::VboData*, std::__ 1::allocator<SChartGL::VboData*> >::__push_back_slow_path<SChartGL::VboData* const&>(SChartGL::VboData* const&&&) in ShinobiCharts(ShinobiCharts)
  "std:: __1::basic_string<char, std::__ 1::char_traits<char>, std:: __1::allocator<char> >::__ init(char const*, unsigned long)", referenced from:
      SChartGL::Drawer::renderRenderData(SChartGL::RenderDataType, SChartGL::RenderData const&, int*, SChartGL::AnimationManager*) in ShinobiCharts(ShinobiCharts)
  "std:: __1::basic_string<char, std::__ 1::char_traits<char>, std::__1::allocator<char> >::append(char const*)", referenced from:
      SChartGL::Drawer::renderRenderData(SChartGL::RenderDataType, SChartGL::RenderData const&, int*, SChartGL::AnimationManager*) in ShinobiCharts(ShinobiCharts)
  "std:: __1::basic_string<char, std::__ 1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:
      SChartGL::Drawer::renderRenderData(SChartGL::RenderDataType, SChartGL::RenderData const&, int*, SChartGL::AnimationManager*) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::renderRenderData(SChartGL::RenderDataType, SChartGL::RenderData const&, int*, SChartGL::AnimationManager*) in ShinobiCharts(ShinobiCharts)
  "std:: __1::__ shared_weak_count::__add_shared()", referenced from:
      SChartGL::Drawer::Drawer(bool, SChartGL::ErrorHandlerHandle const*) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::addRenderQueueData(std::__1::shared_ptr<SChartGL::SeriesHandle const>, SChartGL::RenderData&, bool) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::removeRenderQueueData(std::__1::shared_ptr<SChartGL::SeriesHandle const>, SChartGL::RenderData&, bool) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::addOrReplaceRenderQueueData(std::__1::shared_ptr<SChartGL::SeriesHandle const>, SChartGL::RenderData&, bool) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::updateRenderQueues(SChartGL::SeriesHandle*, SChartGLTranslation const*) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::updateRenderQueues(SChartGL::SeriesHandle*, int, float, float, float) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::addOrReplaceTriangles(SChartGL::GLTriangle3D*, std::__1::shared_ptr<SChartGL::SeriesHandle const>, int*, int, bool, SChartGL::GLStencilParams*, SChartGLTranslation const*, bool) in ShinobiCharts(ShinobiCharts)
      ...
  "std:: __1::__ shared_weak_count::__release_shared()", referenced from:
      SChartGL::Drawer::Drawer(bool, SChartGL::ErrorHandlerHandle const*) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::~Drawer() in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::addRenderQueueData(std::__1::shared_ptr<SChartGL::SeriesHandle const>, SChartGL::RenderData&, bool) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::removeRenderQueueData(std::__1::shared_ptr<SChartGL::SeriesHandle const>, SChartGL::RenderData&, bool) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::addOrReplaceRenderQueueData(std::__1::shared_ptr<SChartGL::SeriesHandle const>, SChartGL::RenderData&, bool) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::updateRenderQueues(SChartGL::SeriesHandle*, SChartGLTranslation const*) in ShinobiCharts(ShinobiCharts)
      SChartGL::Drawer::updateRenderQueues(SChartGL::SeriesHandle*, int, float, float, float) in ShinobiCharts(ShinobiCharts)
      ...
  "std:: __1::__ shared_weak_count::~__shared_weak_count()", referenced from:
      std:: __1::__ shared_ptr_pointer<SChartGL::SeriesHandle const*, std:: __1::default_delete<SChartGL::SeriesHandle const>, std::__ 1::allocator<SChartGL::SeriesHandle const> >::~__shared_ptr_pointer() in ShinobiCharts(ShinobiCharts)
      std:: __1::__ shared_ptr_pointer<SChartGL::SeriesHandle const*, std:: __1::default_delete<SChartGL::SeriesHandle const>, std::__ 1::allocator<SChartGL::SeriesHandle const> >::~__shared_ptr_pointer() in ShinobiCharts(ShinobiCharts)
      std:: __1::__ shared_ptr_pointer<SChartGL::SeriesHandle*, std:: __1::default_delete<SChartGL::SeriesHandle>, std::__ 1::allocator<SChartGL::SeriesHandle> >::~__shared_ptr_pointer() in ShinobiCharts(ShinobiCharts)
      std:: __1::__ shared_ptr_pointer<SChartGL::SeriesHandle*, std:: __1::default_delete<SChartGL::SeriesHandle>, std::__ 1::allocator<SChartGL::SeriesHandle> >::~__shared_ptr_pointer() in ShinobiCharts(ShinobiCharts)
      std:: __1::__ shared_ptr_pointer<SChartGL::ErrorHandlerHandle const*, std:: __1::default_delete<SChartGL::ErrorHandlerHandle const>, std::__ 1::allocator<SChartGL::ErrorHandlerHandle const> >::~__shared_ptr_pointer() in ShinobiCharts(ShinobiCharts)
      std:: __1::__ shared_ptr_pointer<SChartGL::ErrorHandlerHandle const*, std:: __1::default_delete<SChartGL::ErrorHandlerHandle const>, std::__ 1::allocator<SChartGL::ErrorHandlerHandle const> >::~__shared_ptr_pointer() in ShinobiCharts(ShinobiCharts)
      std:: __1::__ shared_ptr_pointer<SChartGL::VboData*, std:: __1::default_delete<SChartGL::VboData>, std::__ 1::allocator<SChartGL::VboData> >::~__shared_ptr_pointer() in ShinobiCharts(ShinobiCharts)
      ...
  "typeinfo for std:: __1::__ shared_weak_count", referenced from:
      typeinfo for std:: __1::__ shared_ptr_pointer<SChartGL::SeriesHandle const*, std:: __1::default_delete<SChartGL::SeriesHandle const>, std::__ 1::allocator<SChartGL::SeriesHandle const> > in ShinobiCharts(ShinobiCharts)
      typeinfo for std:: __1::__ shared_ptr_pointer<SChartGL::SeriesHandle*, std:: __1::default_delete<SChartGL::SeriesHandle>, std::__ 1::allocator<SChartGL::SeriesHandle> > in ShinobiCharts(ShinobiCharts)
      typeinfo for std:: __1::__ shared_ptr_pointer<SChartGL::ErrorHandlerHandle const*, std:: __1::default_delete<SChartGL::ErrorHandlerHandle const>, std::__ 1::allocator<SChartGL::ErrorHandlerHandle const> > in ShinobiCharts(ShinobiCharts)
      typeinfo for std:: __1::__ shared_ptr_pointer<SChartGL::VboData*, std:: __1::default_delete<SChartGL::VboData>, std::__ 1::allocator<SChartGL::VboData> > in ShinobiCharts(ShinobiCharts)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

  ![](file://localhost/Users/kcassar/Desktop/Screen%20Shot%202014-01-24%20at%2012.18.22%20PM.png) ![](file://localhost/Users/kcassar/Desktop/Screen%20Shot%202014-01-24%20at%2012.18.22%20PM.png)


#2

Which version of charts are you using? As of 2.5.7, we now use libc++.dylib instead of libstdc++


#3

that fixed it thanks.


#4

That really helped.

Thanks.