xcode下使用opencv和ffmpeg的问题
小弟最近才开始学习opencv,想在xcode中加入opencv和ffmpeg,现在有个问题始终无法解决,希望得到各位前辈的帮助!!!
1、我编译了ffmpeg的静态库,配置如下:./configure --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc --as='gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk --extra-ldflags=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/system --target-os=darwin --arch=i386 --cpu=i386 --extra-cflags='-I/usr/local/include -arch i386' --extra-ldflags='-L/usr/local/lib -arch i386 ' --enable-pic --enable-cross-compile --enable-gpl --enable-libx264 --disable-ffplay --disable-ffserver --enable-decoder=h264 --enable-encoder=libx264 --disable-doc --disable-asm --prefix=/users/sj/ffmpeg-0.6.7/lib --enable-libx264 --cpu=i386
经过此配置编译得到的静态库,我能在Xcode中正常调用,xcode --build settings --apple llvm 5.0 -language--compile sources as --according to file type,在compile sources as object-c++ 时,好多函数方法 链接的时候找不到
2、在opencv官网下载了ios下的opencv2.framework ,可以在xcode中正常使用,但是xcode --build settings --apple llvm 5.0 -language--compile sources as 只能在object-c++下正常使用。
3、我想在同一个xcode工程中同时使用ffmpeg和opencv,但是它们各自分别只能在according to file type和object-c++中使用。。。。
我想请问一下,是不是能把ffmpeg的用g++编译,ffmpeg就也可以在 xcode --build settings --apple llvm 5.0 -language--compile sources as object-c++ 下正常使用了?