Hi there. I included libcurl (which came with cocos2d-x by default in thirdparty folder) into my project but I get this error:
ld: duplicate symbol _main in /Users/zhieng/Documents/MyProject/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(main.o) and /Users/zhieng/Documents/MyProject/build/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/i386/main.o
I was try to added “libcurl.a” and “Header” files to Libs Folder!
and then error!
I want konw how to add the ‘curl lib files’ in my project.
I think libcurl.a is got a ‘main()’ method…
but i cannot fix it!
>> this is the message
ld: duplicate symbol _main in /Users/dongsugim/Desktop/eclipse/DevLib/cocos2d-1.0.1-x-0.10.0/BKWorld/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(main.o) and /Users/dongsugim/Desktop/eclipse/DevLib/cocos2d-1.0.1-x-0.10.0/BKWorld/build/BKWorld.build/Debug-iphonesimulator/BKWorld.build/Objects-normal/i386/main.o
@Alexandar … thanks a lot … wasted a complete day in clearing the “Other Linker Flags” for the project …… instead i should have been doing the same for the target (By selecting the required target from the Targets and then selecting info) … thanks again
Unfortunately, this isn’t a total solution. Some frameworks on ios requires using of “-all_load” flag, Openfeint for example.
I know that Openfeint may be compiled from sources, but compilation time become huge.
yes,i meet the same problem!
i solved it by set ‘Other Linker Flags’ field to blank!
but if some other framework on ios requires using of “~~all_load" flag or "~~ObjC”,
xcode report error ld: duplicate symbol _main in /Users/zhieng/Documents/MyProject/libs/cocos2dx/platform/third_party/ios/libraries/libcurl.a(main.o) and /Users/zhieng/Documents/MyProject/build/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/i386/main.o
pls help.