Page 1 of 1

VLCKit Swift Example

Posted: 17 Oct 2015 04:26
by JonasVentureJr
Hey there. I'm new to vlckit. Are there any examples out there of how to use it with swift?

Thanks!

Re: VLCKit Swift Example

Posted: 17 Oct 2015 22:12
by fkuehne
I'm not aware of any public sample code. However, we updated all the headers so it should be as seamless to integrate as all Objective-C frameworks.

Re: VLCKit Swift Example

Posted: 25 Oct 2015 03:54
by JonasVentureJr
Ok that's good to hear. I started trying to get a working example using cocoapods, but I get linker errors pages long.

Ld /Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Products/Debug-iphonesimulator/Subtle.app/Subtle normal x86_64
cd /Users/eric/Desktop/sub/Subtle
export IPHONEOS_DEPLOYMENT_TARGET=9.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Products/Debug-iphonesimulator -F/Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Products/Debug-iphonesimulator -F/Users/eric/Desktop/sub/Subtle/Pods/MobileVLCKit/MobileVLCKit-binary -filelist /Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Intermediates/Subtle.build/Debug-iphonesimulator/Subtle.build/Objects-normal/x86_64/Subtle.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.0 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lbz2 -liconv -lstdc++ -lxml2 -lz -framework AFNetworking -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreText -framework MobileVLCKit -framework OpenGLES -framework QuartzCore -framework Security -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Intermediates/Subtle.build/Debug-iphonesimulator/Subtle.build/Objects-normal/x86_64/Subtle.swiftmodule -framework MobileVLCKit -framework Pods_Subtle -Xlinker -dependency_info -Xlinker /Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Intermediates/Subtle.build/Debug-iphonesimulator/Subtle.build/Objects-normal/x86_64/Subtle_dependency_info.dat -o /Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Products/Debug-iphonesimulator/Subtle.app/Subtle

Undefined symbols for architecture x86_64:
"std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::find(wchar_t const*, unsigned long, unsigned long) const", referenced from:

and it goes on and on from there. Does anyone know what I might be missing?

Re: VLCKit Swift Example

Posted: 25 Oct 2015 16:41
by fkuehne
You don't link against libc++ (or with the stable release, libstdc++).

Re: VLCKit Swift Example

Posted: 25 Oct 2015 17:50
by JonasVentureJr
Ok, I gave that a shot. I tried adding -llibc++ to the "Other Linker Flags" page, but now I'm getting:

ld: library not found for -llibc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Did i do that wrong? Thanks for all the help by the way.