dji-sdk / DJIWidget

The DJIWidget is a delightful DJI library includes VideoPreviewer for video decoding.
Other
36 stars 30 forks source link

"libavutil/avconfig.h" not found #4

Closed SpencerKaiser closed 6 years ago

SpencerKaiser commented 6 years ago

After installing the framework via Cocoapods, I try to build the xcworkspace file and the DJIWidget framework generates the following error from the line below:

#include "libavutil/avconfig.h"     // 'libavutil/avconfig.h' file not found

Here's my Podfile:

target 'MyApp' do
  use_frameworks!

  # Pods for MyApp
  pod 'DJIWidget', '~> 1.0'
  pod 'DJI-SDK-iOS', '~> 4.7.1'

  target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

DJIWidget ~1.0 macOS Mojave 10.14 Xcode 10.0.0

EDIT: it seems I was able to resolve the issue with the following steps, however, I'm leaving this issue open as this solution is only temporary as it requires each user to replicate each time the repo is cloned:

  1. Modify Podfile to include use_frameworks!
  2. pod install
  3. Modify Podfile to exclude use_frameworks!
  4. pod install
lacklock commented 6 years ago

Same issue happened to me. I ask the dji developer team, they said currently DJIWidget is only support static framework. So, if you are using swift, you should remove use_frameworks! from podfile

dji-dev commented 6 years ago

Hi @SpencerKaiser @lacklock , thanks for the feedbacks. We just release DJIWidget 1.1, now it supports dynamic framework, you can keep the use_frameworks! in the podfile for Swift project.