6

I'm struggling a bit to build my project with MobileVLCKit and cocoapods. Without adding any VLCKit code, I get errors when building the app, on simulator or device.

Pod file:

platform :ios, '8.0'

target 'VLCKitTest' do
  pod 'MobileVLCKit'
end

This is the error I get

Undefined symbols for architecture arm64:
  "std::runtime_error::runtime_error(std::string const&)", referenced from:
      libebml::CRTError::CRTError(std::string const&, int) in MobileVLCKit(StdIOCallback.o)
  "std::ostream& std::ostream::_M_insert<void const*>(void const*)", referenced from:
      libebml::IOCallback::writeFully(void const*, unsigned long) in MobileVLCKit(IOCallback.o)
      libebml::IOCallback::readFully(void*, unsigned long) in MobileVLCKit(IOCallback.o)

      [...]

My deployment target is 8.0. I have set my "Build Active Architecture Only" to YES in Debug.

Thanks a lot for your help!

lorenzo
  • 1,487
  • 1
  • 17
  • 25

3 Answers3

7

In addition to doing what Mukesh Thawani said;

Change C++ Standard Library to libstdc++ in the Build Settings.

I also needed to add the libstdc++.6.tbd binary in Build Phases -> Link Binary With Libraries.

This worked for me with iOS 9.0.

Vegard
  • 4,352
  • 1
  • 27
  • 25
2

Change C++ Standard Library to libstdc++ in the Build Settings.

Mukesh Thawani
  • 316
  • 5
  • 12
  • I still get the same error after changing the setting unfortunately – lorenzo Aug 21 '15 at 12:25
  • Clean the code and restart the app. Sometimes this solves the problem. – Mukesh Thawani Aug 21 '15 at 12:34
  • I still have the same issue. I tried to add the lib in "Link Binary with Libraries" but it doesn't change anything. – lorenzo Aug 24 '15 at 08:04
  • so your project builds right after integrating MobileVLCKit with cocoapods? – lorenzo Aug 24 '15 at 10:41
  • 1
    After searching a bit I succeeded in compiling an objective C project with a 6.1 deployment target, unfortunately I need to make it work on iOS8 with swift – lorenzo Aug 24 '15 at 12:42
  • See this error not only comes with MobileVLCKit but comes with other frameworks too, so mine was with different frameworks, but that is solved after updating the library. – Mukesh Thawani Aug 24 '15 at 13:10
2

I finally succeeded to compile my project using a specially iOS8 compiled version of the library by Felix Paul Kühne, Lead Developer of VLC for OS X and iOS.

Check out the link near the end of the discussion:

https://forum.videolan.org/viewtopic.php?f=36&t=128011&p=430329#p430329

lorenzo
  • 1,487
  • 1
  • 17
  • 25
  • too sad, the file isn't available anymore and no comments left on how to compile this "special" build – peetonn Feb 18 '17 at 03:30