gpt4 book ai didi

xcode - 递归地将文件夹中的cpp文件添加到Compile Sources

转载 作者:行者123 更新时间:2023-12-02 18:21:09 41 4
gpt4 key购买 nike

根据这个Apple doc :

Select the destination targets for your selected files or folder references. New folder references and files that can participate in the build process become members of the selected targets.

在我向项目添加文件夹引用后,编译源中的文件没有发生任何更改 - 因此,构建项目会导致许多 undefined symbol 问题。我要添加的文件夹的子目录中可能有一百个 cpp 文件,肯定有一种方法可以将它们添加到项目中,而无需单独将每个文件添加到编译源中吗?这不仅容易出错而且耗时。

最佳答案

添加源文件文件夹或包含源文件的任意文件夹树时,您可以通过在添加文件时选择一个选项将它们全部自动添加到编译源中:

为任何添加的文件夹创建组

没有这个,它们将不会被添加。区别很大,而且它不是默认值。

关于xcode - 递归地将文件夹中的cpp文件添加到Compile Sources,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34872928/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com