iOS learning to create multiple sub projects

Source: Internet
Author: User

Keep growing. Daily one creation application Engineering contains multiple static engineering

As shown in an application project, we created a static sub-engineering Projectone

When we use a subproject header file, we find that the file cannot find the error.

Workaround:
Using $ (BUILT_PRODUCTS_DIR) and $ (srcroot) to configure the header file search path for the project
where $ (Built_products_dir) represents the final path of the product after the project build is successful, we can set it through the Per-configuration build products path item under Build settings
$ (srcroot): The path to the project file
Non-recursive: Do not poll recursive: polling

Compile the project again and find the suspect successfully compiled
Although we can successfully compile but the runtime will be wrong, this is all we need in the parent project to add engineering dependencies on it, which can guarantee the compilation of the parent project before the child project
header file for child engineering call parent Project

By setting the header file search path for the subproject is.. /.. Recursive will be able to compile the

Note that under normal circumstances we rarely invoke the parent project in the subproject, and the general sub engineering is independent of the parent project, which conforms to the principle of program design.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.