1

I'm new to flutter development and I'm trying to develop a plugin that uses dlib through dart:ffi. I was able to build the dlib and generate libdlib.a but I can't add it to my podspec.

My podspec looks like this:

Pod::Spec.new do |s|
  s.name             = 'facerecognitiondlib'
  s.version          = '0.0.1'
  s.summary          = 'A new Flutter plugin project.'
  s.description      = <<-DESC
A new Flutter plugin project.
                       DESC
  s.homepage         = 'http://example.com'
  s.license          = { :file => '../LICENSE' }
  s.author           = { 'Your Company' => 'email@example.com' }
  s.source           = { :path => '.' }
  s.source_files = 'Classes/**/*'
  s.dependency 'Flutter'
  s.platform = :ios, '9.0'

  # Flutter.framework does not contain a i386 slice.
  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
  s.swift_version = '5.0'
  s.vendored_frameworks = 'opencv2.framework'
  s.vendored_libraries = 'libdlib'
end

But when I run the code, it can't find the dlib headers. How I add dlib headers path to podspec?

And I read that dlib need some flags, like these:

DLIB_NO_GUI_SUPPORT

DLIB_JPEG_SUPPORT

NDEBUG

DLIB_USE_BLAS

DLIB_USE_LAPACK

How I add these flags in the podspec?

0 Answers0