I have been creating an entire plethora of c++ syntax to help beginners. I use Xcode as my primary IDE. I tried running a program in "function" target but it keeps showing this error.
duplicate symbol _main in:
/Users/xivya/Library/Developer/Xcode/DerivedData/parentcpp-afpbdfpaaxeerfdalgncgzpkuaqt/Build/Intermediates.noindex/parentcpp.build/Debug/function.build/Objects-normal/x86_64/manipulator.o
/Users/xivya/Library/Developer/Xcode/DerivedData/parentcpp-afpbdfpaaxeerfdalgncgzpkuaqt/Build/Intermediates.noindex/parentcpp.build/Debug/function.build/Objects-normal/x86_64/pattern_program.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have selected "function" target from top-left, see image -
But at mid-right of the screen "array" target is selected under "Target membership". It selects itself automatically. Whenever I change my target to anything else no error happens. Any and all help will be highly appreciated!