ld: symbol(s) not found for architecture i386

4008 단어 xcodecocos2d-x
문 제 를 야기 하 다.
xcode 를 사용 하여 cocos2d-x 응용 프로그램 을 실행 할 때 이러한 오류 가 발생 했 습 니 다.
Ld /Users/sjbwybls/Library/Developer/Xcode/DerivedData/MyGame-arludletzetwkseytsepwlnpmgtv/Build/Products/Debug-iphonesimulator/MyGame.app/MyGame normal i386
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
setenv 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/iPhoneSimulator6.1.sdk -L/Users/sjbwybls/Library/Developer/Xcode/DerivedData/MyGame-arludletzetwkseytsepwlnpmgtv/Build/Products/Debug-iphonesimulator -L/Users/sjbwybls/cocos2d-x-2.1.4/projects/MyGame/proj.ios/../../../cocos2dx/platform/third_party/ios/libraries -L/Users/sjbwybls/cocos2d-x-2.1.4/projects/MyGame/proj.ios/../../../external/libwebsockets/ios/lib -F/Users/sjbwybls/Library/Developer/Xcode/DerivedData/MyGame-arludletzetwkseytsepwlnpmgtv/Build/Products/Debug-iphonesimulator -filelist /Users/sjbwybls/Library/Developer/Xcode/DerivedData/MyGame-arludletzetwkseytsepwlnpmgtv/Build/Intermediates/MyGame.build/Debug-iphonesimulator/MyGame.build/Objects-normal/i386/MyGame.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -fobjc-link-runtime -mios-simulator-version-min=4.0 /Users/sjbwybls/Library/Developer/Xcode/DerivedData/MyGame-arludletzetwkseytsepwlnpmgtv/Build/Products/Debug-iphonesimulator/libcocos2dx.a -lcurl -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -lxml2 -lz -framework QuartzCore -framework OpenAL -framework AVFoundation -framework AudioToolbox -lwebsockets -o /Users/sjbwybls/Library/Developer/Xcode/DerivedData/MyGame-arludletzetwkseytsepwlnpmgtv/Build/Products/Debug-iphonesimulator/MyGame.app/MyGame
Undefined symbols for architecture i386: “BaseLayer::setBackgroundImage(char const*)“, referenced from:
  Welcome::init() in Welcome.o
  Welcome::setupViews() in Welcome.o
  Welcome::create() in Welcome.o
  Loading::init() in Loading.o
  Loading::setupViews() in Loading.o
  Loading::create() in Loading.o
  Option::init() in Option.o
  ...   "BaseLayer::init()", referenced from:
  Welcome::init() in Welcome.o
  Welcome::create() in Welcome.o
  Loading::init() in Loading.o
  Loading::create() in Loading.o
  Option::init() in Option.o
  Option::create() in Option.o
  Board::init() in Board.o
  ...   "BaseLayer::BaseLayer()", referenced from:
  Welcome::Welcome() in Welcome.o
  Welcome::Welcome() in Welcome.o
  Welcome::create() in Welcome.o
  Loading::Loading() in Loading.o
  Loading::Loading() in Loading.o
  Loading::create() in Loading.o
  Option::Option() in Option.o
  ...   "BaseLayer::~BaseLayer()", referenced from:
  Welcome::~Welcome() in Welcome.o
  Welcome::~Welcome() in Welcome.o
  non-virtual thunk to Welcome::~Welcome() in Welcome.o
  Welcome::~Welcome() in Welcome.o
  non-virtual thunk to Welcome::~Welcome() in Welcome.o
  Loading::~Loading() in Loading.o
  Loading::~Loading() in Loading.o
  ...   "typeinfo for BaseLayer", referenced from:
  typeinfo for Welcome in Welcome.o
  typeinfo for Loading in Loading.o
  typeinfo for Option in Option.o
  typeinfo for Board in Board.o
  typeinfo for Game in Game.o
  typeinfo for Score in Score.o
  typeinfo for About in About.o
  ...

ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
한참 을 한 후에 야 원래 xcode 는 매우 엄격 한 인용 규정 이 있 고 C++의 컴 파일 규칙 이 있 음 을 알 게 되 었 습 니 다.모든 컴 파일 된 파일 은 명령 행 에 있어 야 합 니 다.저 는 BaseLayer.h(와.cpp)가 인용 을 추가 하지 않 았 기 때 문 입 니 다.
이에 특별히 기록 합 니 다

좋은 웹페이지 즐겨찾기