Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recursively add cpp files in folder to Compile Sources

Tags:

xcode

According to this 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.

After I add a folder reference to my project, there is no change to the files in Compile Sources -- as a result, building the project results in many Undefined Symbols problems. There are possibly a hundred cpp files in the subdirs of the folder I am adding, surely there is a way to add them to the project without individually adding each one to the Compile Sources? That would be error prone as well as time-consuming.

like image 310
johnbakers Avatar asked Mar 14 '23 14:03

johnbakers


1 Answers

When adding a folder of source files, or an arbitrary tree of folders that contain source files, you can have them all automatically get added to the Compile Sources by selecting one option when you add the files:

Create groups for any added folders

Without this, they will not be added. Big distinction, and it is not the default.

like image 186
johnbakers Avatar answered Apr 02 '23 18:04

johnbakers