iOS - Header File notation error for Keeping Directory Structure in frameworks

橙三吉。 提交于 2019-12-08 17:26:28

问题


Problem Background :

I have made my own library in C++ with its respective .h and .cc files. They are organized in a small directory structure as shown :

.trillBPP
├── BPSK
│   ├── finddata.cc
│   ├── finddata.h
│   ├── trigger.cc
│   └── trigger.h
├── config.h
├── config_msvc.h
├── miscfunc.cc
├── miscfunc.h
└── vector
    ├── binary.cpp
    ├── binary.h
    ├── mat1.cpp
    ├── mat1.h
    ├── misc.cpp
    ├── misc.h
    ├── sort.h
    ├── vec.cpp
    └── vec.h

The header files in C++ are included simply with a call like - #include <trillBPP/vector/vec.h> or #include <trillBPP/config.h> depending on the ,file name and directory.

Problem Statement :

I'm porting this C++ code and I'm trying to create a framework in Xcode but as it turns out, Xcode flattens the directory structure and gives an error for the header file calls, the error that it gives says trillBPP/vector/vec.h file not found. This is how the project looks like :

I've tried adding the files as Folder References instead of groups, but then it won't even recognize the header-files as header files! In Header Search Paths in Build Settings, I've also added -I and /, with no success. I came across the answer Keeping directory structure when creating frameworks in xcode , but that didn't help out because of less details for me since I'm an Xcode newbie.

So, 1. Without changing the header file call how can I tell Xcode to keep the directory structure in the final framework, 2. and also keep the header file calls the same?

来源:https://stackoverflow.com/questions/47278081/ios-header-file-notation-error-for-keeping-directory-structure-in-frameworks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!