XCode does not add c++ source files that are in su

2019-04-30 03:35发布

I use XCode 5.1 for C++ development. I have existing code which I add to the project by dragging files from Finder. The project shows all necessary .h and .cpp files. But when I click Build Phases->Compile Sources, I only see sources that from the root directory in my source structure. None of the source files from subdirectories appear in the Compile Sources. Why? And how to fix this?

Also, when I try to add the missing .cpp file from Build Phases->Compile Sources by pressing +, XCode does not expand the subdirectories, so I cannot select the missing .cpp files.

标签: c++ xcode xcode5
1条回答
劫难
2楼-- · 2019-04-30 04:25

This is unbelievable. The only problem was that I was adding folder structure with Create folder references for any added folders option instead of Create groups for any added folders.

But still don't understand what is the difference in terms of recognition of source files.

Other peculiarity is that you should add resource files in opposite way (Create folder references for any added folders). Otherwise the iOS application does not find the files and does not compile.

查看更多
登录 后发表回答