以前は Card.IO バインディングを手動で作成していました。それはコンパイル中であり、それを使用したプロジェクトもそうでしたが、あまりにも頻繁にクラッシュしました。
今、ObjectiveSharpie を使用してバインディングをゼロから再作成しようとしています。バインド プロジェクトはコンパイルされますが、別のプロジェクトから参照すると、以下に示すコンパイラ エラーが発生します。
AVFoundation フレームワーク項目を「未定義のシンボル...」として表示していたので、Xamarin の IOS ビルド オプションの下に「-cxx」オプションがあります。プロジェクトにフレームワークを追加する方法のさまざまな組み合わせを試しました。これにより、メイン プロジェクトで CardIO 名前空間が認識されなくなります - -gcc_flags "-framework ..." が追加されました。これにより、コンパイラから「フレームワークが見つかりません」というメッセージが表示されます。最終的に を含めて AVFoundation を解決し、using AVFoundation
そのクラスの型名を要求して、リンカーがそれを最適化しないようにしました-私の本では醜いハックです。
以下のエラーでは、欠落しているフレームワークがさらにあるように見えますが、その上std::...
、「-cxx」パラメーターを使用してそれらを解決する必要があったと思います
このバインディングをコンパイルして適切に動作させる方法がわかりません。
Undefined symbols for architecture armv7:
"_AudioServicesPlayAlertSound", referenced from:
-[CardIOCameraViewController vibrate] in libCardIO.a(CardIOCameraViewController.o)
"_CMGetAttachment", referenced from:
-[CardIOVideoStream captureOutput:didOutputSampleBuffer:fromConnection:] in libCardIO.a(CardIOVideoStream.o)
"_CMSampleBufferGetImageBuffer", referenced from:
-[CardIOVideoFrame process] in libCardIO.a(CardIOVideoFrame.o)
"_CVPixelBufferGetBaseAddressOfPlane", referenced from:
+[CardIOIplImage imageFromYCbCrBuffer:plane:] in libCardIO.a(CardIOIplImage.o)
"_CVPixelBufferGetBytesPerRowOfPlane", referenced from:
+[CardIOIplImage imageFromYCbCrBuffer:plane:] in libCardIO.a(CardIOIplImage.o)
"_CVPixelBufferGetHeightOfPlane", referenced from:
+[CardIOIplImage imageFromYCbCrBuffer:plane:] in libCardIO.a(CardIOIplImage.o)
"_CVPixelBufferGetWidthOfPlane", referenced from:
+[CardIOIplImage imageFromYCbCrBuffer:plane:] in libCardIO.a(CardIOIplImage.o)
"_CVPixelBufferLockBaseAddress", referenced from:
-[CardIOVideoFrame process] in libCardIO.a(CardIOVideoFrame.o)
"_CVPixelBufferUnlockBaseAddress", referenced from:
-[CardIOVideoFrame process] in libCardIO.a(CardIOVideoFrame.o)
"_OBJC_CLASS_$_EAGLContext", referenced from:
objc-class-ref in libCardIO.a(CardIOGPURenderer.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char const*, unsigned long, unsigned long) const", referenced from:
cv::CommandLineParser::CommandLineParser(int, char const* const*, char const*)in libCardIO.a(cmdparser.o)
(anonymous namespace)::split_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)in libCardIO.a(cmdparser.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char, unsigned long) const", referenced from:
cv::CommandLineParser::CommandLineParser(int, char const* const*, char const*)in libCardIO.a(cmdparser.o)
(anonymous namespace)::del_space(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)in libCardIO.a(cmdparser.o)
cv::CommandLineParser::printParams() in libCardIO.a(cmdparser.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::rfind(char, unsigned long) const", referenced from:
(anonymous namespace)::del_space(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)in libCardIO.a(cmdparser.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(char const*) const", referenced from:
cv::CommandLineParser::CommandLineParser(int, char const* const*, char const*)in libCardIO.a(cmdparser.o)
cv::CommandLineParser::printParams() in libCardIO.a(cmdparser.o)
bool cv::CommandLineParser::get<bool>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)in libCardIO.a(cmdparser.o)
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from: