gpt4 book ai didi

c++ - ld : symbol(s) not found for architecture i386 IOS c++

转载 作者:行者123 更新时间:2023-11-28 06:23:18 25 4
gpt4 key购买 nike

当我尝试为 iphone 模拟器编译时出现以下错误。我正在尝试使用没有提升的 websockets 和 cocos2d-x我添加了这个库 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)

最佳答案

我对 POCO 了解不多,但看看您对 clang++ 的调用,我可以肯定地说您没有将任何 POCO 库链接到您的应用程序。

请务必为“-L”和“-l”选项指定正确的值(XCode 中必须有一种方法可以做到这一点),一切都应该正常工作。

关于c++ - ld : symbol(s) not found for architecture i386 IOS c++,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28987817/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com