Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS8/Swift and MobileVLCKit build fails

Tags:

swift

ios8

vlc

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!

like image 251
lorenzo Avatar asked Aug 21 '15 09:08

lorenzo


3 Answers

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.

like image 160
Vegard Avatar answered Oct 18 '22 22:10

Vegard


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

like image 2
Mukesh Thawani Avatar answered Oct 18 '22 20:10

Mukesh Thawani


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

like image 2
lorenzo Avatar answered Oct 18 '22 22:10

lorenzo