Linking error in xcode using cocos2d-x v3.12

I’m using xcode to build and run my project and I added a folder reference called “Components” this folder is under “Classes” and I have may .cpp’s in “Classes” that #include many .h’s which are situated in “Components” when I build it says that there are “undefined references for this architecture” meaning the build system is not finding those .cpp’s and linking them to my project what should I do?

If you select one of your .cpp files, in the right menu of Xcode (the “Utilities” pane), is your project ticked under “Target Membership”?

Also, are your .cpp files listed under “Compile Sources” in “Build Phases” under your project’s settings?

The folder “Components” which contains my logic code is checked under Target Membership but the pane on the right only shows up for the folder reference but not for the .cpp’s that are in the folder, is it the same thing?

I added my whole “Components” folder reference in Compile Sources but it’s still giving me an error?

Are you saying that “Target Membership” does not appear as an option when you select one of your .cpp files?

Are you getting the same error or a different error?

Yes it doesn’t appear on the .cpp itself but it appears on the folder reference that contains it
Same error.

I guess I will have to use Groups because it makes life much easier as I don’t have to add them to Compile Sources manually.

Yeah, I use groups for my .cpp, so I’m not sure about using the alternative.

I tried to add my files but I get an error “error while adding multiple files” do you know how to fix that please?

Does it give you any indication of what the error was while adding them?

No, nothing.

Did you remove the files from the list on the left-side of Xcode before adding them again?

I just added it one by one and everything builds just fine thanx! May God bless you!