ld:找不到架构armv7的符号(SDL iOS)

时间:2015-07-28 03:43:09

标签: c++ ios sdl

我正在使用SDL和SDL_image制作简单的iOS游戏。但是,当我尝试编译这个项目时,我得到一个clang链接器错误。我从SDL mercurial repo获得了SDL和SDL_image。任何帮助将不胜感激。

编译器日志(如果有帮助):

Ld      /Users/safsom2/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-cxizfsoapvugmvaofumxqgneoyxv/Build/Intermediates/___PROJECTNAME___.build/Debug-iphoneos/___PROJECTNAME___.build/Objects-normal/armv7/___PROJECTNAME___ normal armv7
cd "/Users/safsom2/Desktop/SDL/Xcode-iOS/Template/SDL iOS Application"
export IPHONEOS_DEPLOYMENT_TARGET=9.0
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/safsom2/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-cxizfsoapvugmvaofumxqgneoyxv/Build/Products/Debug-iphoneos -F/Users/safsom2/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-cxizfsoapvugmvaofumxqgneoyxv/Build/Products/Debug-iphoneos -filelist /Users/safsom2/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-cxizfsoapvugmvaofumxqgneoyxv/Build/Intermediates/___PROJECTNAME___.build/Debug-iphoneos/___PROJECTNAME___.build/Objects-normal/armv7/___PROJECTNAME___.LinkFileList -miphoneos-version-min=9.0 -dead_strip -fembed-bitcode-marker /Users/safsom2/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-cxizfsoapvugmvaofumxqgneoyxv/Build/Products/Debug-iphoneos/libSDL2.a -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework CoreAudio -framework AudioToolbox -framework CoreGraphics -framework CoreMotion -Xlinker -dependency_info -Xlinker /Users/safsom2/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-cxizfsoapvugmvaofumxqgneoyxv/Build/Intermediates/___PROJECTNAME___.build/Debug-iphoneos/___PROJECTNAME___.build/Objects-normal/armv7/___PROJECTNAME____dependency_info.dat -o /Users/safsom2/Library/Developer/Xcode/DerivedData/___PROJECTNAME___-cxizfsoapvugmvaofumxqgneoyxv/Build/Intermediates/___PROJECTNAME___.build/Debug-iphoneos/___PROJECTNAME___.build/Objects-normal/armv7/___PROJECTNAME___

Running ld for armv7 ...
Undefined symbols for architecture armv7:
"_IMG_LoadTexture", referenced from:
  CSprite::CSprite(SDL_Renderer*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int, int, int, int) in Sprite.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

还有错误似乎来自的文件,(没有项目正确编译)

#include "Main.hpp"

int main(int argc, char *argv[])
{
    CMain* cmain = new CMain(600,500);

    cmain->GameLoop();

    return 0;
}

感谢任何可以帮助我的人!

0 个答案:

没有答案