4

I am trying to embed libarchive in a Swift-based framework I am building.

I created a module map to privately include archive.h (inside module libarchive near the end)

framework module X
{
    requires objc, blocks, objc_arc
    umbrella header "X.h"

    private header "XPrivate.h"
    private header "x.h"

    use Darwin.C

    module libarchive
    {
        private header "archive.h"
        export *
    }
}

Inside archive.h, the following line is causing the error:

#include <inttypes.h>

I don't understand why this include isn't being mapped to the correct inttypes module in my SDK.

There is a module Darwin.C.inttypes is defined inside my SDK, here:

/Applications/Xcode.app/.../MacOSX10.12.sdk/usr/include/module.modulemap

Can someone tell me how to get the #include in archive.h to map to the declared module?

nielsbot
  • 15,922
  • 4
  • 48
  • 73

1 Answers1

2

Pretend to be a system framework by changing to framework module X [system].

Not the correct solution but it seems to work.

Anders
  • 186
  • 1
  • 6