Please make sure that you follow the libffi instructions issued in the TBD or git project: https://github.com/libffi/libffi
Here are some of the highlights:
First you must configure the distribution for your specific system. Change to the directory where you want to embed libffi and run the "configure" found in the root directory of the libffi source distribution.
If you create libffi directly from source control, configure will not exist; run ./autogen.sh first.
You can specify where to install the libffi library and header files. To do this, use the --prefix configure switch. Libffi will be installed by default /usr/local .
If you want to enable additional debugging checks at runtime, use the --enable-debug configure switch. This is useful when your program dies mysteriously when using libffi.
Another useful configuration switch is --enable-purify-safety . Using this will add additional code that will suppress certain warnings when you use Purify with libffi. Use this switch only when using Clean, as this will slow down the library .
For iOS builds, the " libffi.xcodeproj " Xcode project is available.
There are many other options to configure. Use " configure --help " to see all of them.
After the configuration is complete, enter " make ". Note that you must use GNU make. You can ftp GNU make from ftp.gnu.org:/pub/gnu/make .
To make libffi work as advertised, enter " make check ". This will require the installation of DejaGNU .
To install the library and header files, enter " make install ".
Alternatively, try combining one of the following git projects into a project to include missing files. Before merging, make sure the files are not outdated.
1 https://github.com/pandamonia/libffi-iOS
2 https://github.com/influitive/libffi-iOS
3 https://github.com/landonf/libffi-ios