VideoCore-Inactive
VideoCore-Inactive copied to clipboard
I'm getting Linking error undefined symbols arm64 H264Encode
compiling from scratch the SampleBroadcaster (ObjC) with VideoCore 0.3.2 XCode Version 6.4 (6E35b) (same error in SWIFT project too)
everything seems ok in project settings, I tried to switch "Build current arch only" to OFF too no solution Undefined symbols for architecture arm64: "videocore::Apple::H264Encode::~H264Encode()", referenced from: std::__1::__libcpp_compressed_pair_impstd::__1::allocator<videocore::Apple::H264Encode, videocore::Apple::H264Encode, 1u>::~__libcpp_compressed_pair_imp() in libVideoCore.a(VCSimpleSession.o) "videocore::Apple::H264Encode::H264Encode(int, int, int, int, bool, int)", referenced from: std::__1::shared_ptrvideocore::Apple::H264Encode std::__1::shared_ptrvideocore::Apple::H264Encode::make_shared<double, double, int, int, bool, int&>(double&&, double&&, int&&, int&&, bool&&, int&&&) in libVideoCore.a(VCSimpleSession.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
what version of CocoaPods are you using? I experienced this error when I updated to CocoaPods 0.38.x, and had to switch back to 0.37.2 to make it work
yes, I'm using the 0.38.2 but what could be wrong and different from the 0.37.2 ?
I don't know exactly but it seems the problem comes from the fact that there are two files called H264Encode.h (and .mm) in two different folders. This somehow causes CocoaPods 0.38.2 to "ignore" these files or something like that. If you see the output of pod install or pod update you'll notice a warning about those files.
I did not have time to investigate more deeply so I don't know what the problem exactly is, but if you downgrade to 0.37.x and run pod install/pod update again it should work correctly.
at the end I was able to compile with CocoaPods 0.38.2 you must add manually the 2 files removed by the pod install process: Precisely are ../../../transforms/Apple/H264Encode.h and ../../../transforms/Apple/H264Encode.mm
thank you for your HELP!! Antonio
No problem :)
Anyway this should be fixed. Does anyone know whether this comes from a bug in CocoaPods itself (that's my bet) or from a misconfiguration in VideoCore ? In the former case, an issue should be raised in their github...
I don't really know much about Cocoapods but we haven't really changed anything since Jeffrey made the pod last summer. I bet it's a bug or something in the new version if it's complaining about files with duplicate names. It should be possible to put files with the same names in different directories and still have it work with the build system!
On Mon, Sep 7, 2015 at 12:48 AM, Germán Sancho [email protected] wrote:
No problem :)
Anyway this should be fixed. Does anyone know whether this comes from a bug in CocoaPods itself (that's my bet) or from a misconfiguration in VideoCore ? In the former case, an issue should be raised in their github...
— Reply to this email directly or view it on GitHub https://github.com/jgh-/VideoCore/issues/186#issuecomment-138218263.
Yes, the cocoa pod 0.38.2 installer breaks the project: if you take a look at the compiled files you'll see the same iOS/H264Encode.mm
present twice.
You need to
- Remove one of the files
- Add the
Apple/H264Encode.mm
one - Set the
-fno-objc-arc
option similar to all the other files in the project.
Obviously this local change will have to be remade every time you update pods, so we really need to get in touch with the CocoaPod team.
Did anyone already file this issue to them?
I have the same issue with U, need to add Apple/H264Encode.mm every time to update pods
Rename transforms/Apple/H264Encode.{h,mm} to H264EncodeApple(so does the include header) does the work. Need to pod install after rename