objective c - Error occur after add a UDP server and client -
i writing program using objective-c. going add udp server , client project, before add file xcode project, project can run successfully. after add mainudp.m , upd.h , upd.m, program cannot run , here error message, how cope issue? thanks
ld /users/bacd/library/developer/xcode/deriveddata/dd-hggkyympepqrutcpbxxlwmtzcjkb/build/products/debug/dd.app/contents/macos/dd normal x86_64 cd /users/bacd/desktop/de export macosx_deployment_target=10.7 /applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.10.sdk -l/users/bacd/library/developer/xcode/deriveddata/dd-hggkyympepqrutcpbxxlwmtzcjkb/build/products/debug -f/users/bacd/library/developer/xcode/deriveddata/dd-hggkyympepqrutcpbxxlwmtzcjkb/build/products/debug -f/users/bacd/desktop/de/bluewear\ osx -filelist /users/bacd/library/developer/xcode/deriveddata/dd-hggkyympepqrutcpbxxlwmtzcjkb/build/intermediates/dd.build/debug/dd.build/objects-normal/x86_64/dd.linkfilelist -mmacosx-version-min=10.7 -fobjc-arc -fobjc-link-runtime -framework avfoundation -framework quartzcore -framework coreaudio -framework carbon -framework iobluetooth -framework cocoa -framework coreservices -xlinker -dependency_info -xlinker /users/bacd/library/developer/xcode/deriveddata/dd-hggkyympepqrutcpbxxlwmtzcjkb/build/intermediates/dd.build/debug/dd.build/objects-normal/x86_64/dd_dependency_info.dat -o /users/bacd/library/developer/xcode/deriveddata/dd-hggkyympepqrutcpbxxlwmtzcjkb/build/products/debug/dd.app/contents/macos/dd duplicate symbol _main in: /users/bacd/library/developer/xcode/deriveddata/dd-hggkyympepqrutcpbxxlwmtzcjkb/build/intermediates/dd.build/debug/dd.build/objects-normal/x86_64/main.o /users/bacd/library/developer/xcode/deriveddata/dd-hggkyympepqrutcpbxxlwmtzcjkb/build/intermediates/dd.build/debug/dd.build/objects-normal/x86_64/mainudp.o ld: 1 duplicate symbol architecture x86_64 clang: error: linker command failed exit code 1 (use -v see invocation)
the new file (mainudp.m
) must define main()
function, entry-point program. can have 1 entry point , have 1 in existing code.
you either need remove new file or remove main()
function contains , access functionality provides via existing code.
Comments
Post a Comment