Live555编译为iOS构建错误 [英] Live555 compile for iOS build error
本文介绍了Live555编译为iOS构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试为iOS编译Live555。
I'm trying to compile Live555 for iOS.
我已完成以下操作:
./genMakefiles iphoneos
make
我得到以下信息构建错误:
I get the following build errors:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -c -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include -I. -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch armv7 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -Wall testMP3Streamer.cpp
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -o testMP3Streamer -L. -arch armv7 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk testMP3Streamer.o ../liveMedia/libliveMedia.a ../groupsock/libgroupsock.a ../BasicUsageEnvironment/libBasicUsageEnvironment.a ../UsageEnvironment/libUsageEnvironment.a
ld: in /usr/lib/system/libcache.dylib, missing required architecture armv7 in file for architecture armv7
collect2: ld returned 1 exit status
make[1]: *** [testMP3Streamer] Error 1
make: *** [all] Error 2
我已尝试在config.iphoneos中更改链接器选项:
I have tried changing the linker options to this as well in the config.iphoneos:
LINK_OPTS = -L. -arch armv7 --isysroot=$(SDK)
当我更改链接器选项时,我得到以下内容错误:
When I change the linker options I get the following errors:
cd testProgs ; make
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -c -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include -I. -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch armv7 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -Wall testMP3Streamer.cpp
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -o testMP3Streamer -L. -arch armv7 --isysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk testMP3Streamer.o ../liveMedia/libliveMedia.a ../groupsock/libgroupsock.a ../BasicUsageEnvironment/libBasicUsageEnvironment.a ../UsageEnvironment/libUsageEnvironment.a
ld: warning: ignoring file /usr/lib/crt1.o, missing required architecture armv7 in file
ld: warning: ignoring file /usr/lib/libstdc++.dylib, missing required architecture armv7 in file
ld: warning: ignoring file /usr/lib/libgcc_s.1.dylib, missing required architecture armv7 in file
ld: warning: ignoring file /usr/lib/libSystem.dylib, missing required architecture armv7 in file
Undefined symbols for architecture armv7:
"start", referenced from:
-u command line option
(maybe you meant: RTPInterface::startNetworkReading(void (*)(void*, int)), MediaSink::startPlaying(MediaSource&, void (*)(void*), void*))
"_exit", referenced from:
play() in testMP3Streamer.o
"operator new(unsigned long)", referenced from:
_main in testMP3Streamer.o
MP3FileSource::MP3FileSource(UsageEnvironment&, __sFILE*)in libliveMedia.a(MP3FileSource.o)
MP3FileSource::MP3FileSource(UsageEnvironment&, __sFILE*)in libliveMedia.a(MP3FileSource.o)
MP3FileSource::createNew(UsageEnvironment&, char const*)in libliveMedia.a(MP3FileSource.o)
_Tables::getOurTables(UsageEnvironment&, unsigned char)in libliveMedia.a(Media.o)
MediaLookupTable::remove(char const*)in libliveMedia.a(Media.o)
MediaLookupTable::ourMedia(UsageEnvironment&) in libliveMedia.a(Media.o)
...
任何想法我做错了什么?
Any ideas what I'm doing wrong?
推荐答案
在运行之前更改config.iphoneos的LINK_OPTS genMakefiles iphoneos。它适用于iOS 5.1 SDK和iOS 6 SDK beta。
Change LINK_OPTS of config.iphoneos before running "genMakefiles iphoneos". It works for me on iOS 5.1 SDK and iOS 6 SDK beta.
LINK_OPTS = -L. -arch armv7 --sysroot=$(SDK) -L$(SDK)/usr/lib/system
这篇关于Live555编译为iOS构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文