Reputation: 656
I get the following error when I try to compile for the iphone Simulator. I am trying to use websockets without boost along with cocos2d-x I added this library Poco websockets
Ld /Users/Goblintosh/Library/Developer/Xcode/DerivedData/HelloCpp-efjnfkcitxbilldlaldflpefelul/Build/Products/Debug-iphonesimulator/HelloCpp.app/HelloCpp normal i386
cd /Users/Goblintosh/Downloads/cocos2d-x-2.2.6/samples/Cpp/HelloCpp/proj.ios
export IPHONEOS_DEPLOYMENT_TARGET=5.1.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk -L/Users/Goblintosh/Library/Developer/Xcode/DerivedData/HelloCpp-efjnfkcitxbilldlaldflpefelul/Build/Products/Debug-iphonesimulator -F/Users/Goblintosh/Library/Developer/Xcode/DerivedData/HelloCpp-efjnfkcitxbilldlaldflpefelul/Build/Products/Debug-iphonesimulator -filelist /Users/Goblintosh/Library/Developer/Xcode/DerivedData/HelloCpp-efjnfkcitxbilldlaldflpefelul/Build/Intermediates/HelloCpp.build/Debug-iphonesimulator/HelloCpp.build/Objects-normal/i386/HelloCpp.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1.1 /Users/Goblintosh/Library/Developer/Xcode/DerivedData/HelloCpp-efjnfkcitxbilldlaldflpefelul/Build/Products/Debug-iphonesimulator/libcocos2dx.a -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -lxml2 -lz -framework QuartzCore -Xlinker -dependency_info -Xlinker /Users/Goblintosh/Library/Developer/Xcode/DerivedData/HelloCpp-efjnfkcitxbilldlaldflpefelul/Build/Intermediates/HelloCpp.build/Debug-iphonesimulator/HelloCpp.build/Objects-normal/i386/HelloCpp_dependency_info.dat -o /Users/Goblintosh/Library/Developer/Xcode/DerivedData/HelloCpp-efjnfkcitxbilldlaldflpefelul/Build/Products/Debug-iphonesimulator/HelloCpp.app/HelloCpp
Undefined symbols for architecture i386:
-
"Poco::Net::Impl::SocketAddressImpl::~SocketAddressImpl()", referenced from:
Poco::Net::Impl::IPv6SocketAddressImpl::~IPv6SocketAddressImpl() in HelloWorldScene.o
Poco::Net::Impl::IPv4SocketAddressImpl::~IPv4SocketAddressImpl() in HelloWorldScene.o
"Poco::Net::IPAddress::IPAddress(void const*, unsigned int)", referenced from:
Poco::Net::Impl::IPv4SocketAddressImpl::host() const in HelloWorldScene.o
"Poco::Net::IPAddress::IPAddress(void const*, unsigned int, unsigned int)", referenced from:
Poco::Net::Impl::IPv6SocketAddressImpl::host() const in HelloWorldScene.o
"typeinfo for Poco::Net::Impl::SocketAddressImpl", referenced from:
typeinfo for Poco::Net::Impl::IPv4SocketAddressImpl in HelloWorldScene.o
typeinfo for Poco::Net::Impl::IPv6SocketAddressImpl in HelloWorldScene.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Upvotes: 0
Views: 485
Reputation: 1954
i am facing the same issue and i think it is because the library does not supports simulator SDK. it should compile on device
Upvotes: 0
Reputation: 1136
I don't know much about POCO, but looking at your call to clang++ I can safely say that you're not linking any POCO libraries to your application.
Be sure to specify correct values for '-L' and '-l' options (there must be a way to do this in XCode) and everything should hopefully work.
Upvotes: 1