Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin.ios Card.io绑定项目无法编译应用程序_Xamarin.ios_Card.io - Fatal编程技术网

Xamarin.ios Card.io绑定项目无法编译应用程序

Xamarin.ios Card.io绑定项目无法编译应用程序,xamarin.ios,card.io,Xamarin.ios,Card.io,我正在尝试从我的Xamarin应用程序调用Card.IO。当我尝试编译我的应用程序时,它在消息中引用了“std::terminate()”,我得到了“架构i386的未定义符号:”。该应用程序是为iPhone设计的,我不知道“i386”是从哪里来的-我可以找到的项目选项中的所有设置都设置为ARMv7,绑定中的LinkWith属性也是如此 IO的指南指出我需要在Xcode中的“其他链接器标志”中添加-lstdc++,但我不知道该将其放在Xamarin Studio的选项中的什么位置 问题是:如何使这

我正在尝试从我的Xamarin应用程序调用Card.IO。当我尝试编译我的应用程序时,它在消息中引用了“std::terminate()”,我得到了“架构i386的未定义符号:”。该应用程序是为iPhone设计的,我不知道“i386”是从哪里来的-我可以找到的项目选项中的所有设置都设置为ARMv7,绑定中的LinkWith属性也是如此

IO的指南指出我需要在Xcode中的“其他链接器标志”中添加
-lstdc++
,但我不知道该将其放在Xamarin Studio的选项中的什么位置

问题是:如何使这个绑定工作?绑定中有错误吗?是否有一些项目设置或以某种方式在我的应用程序中添加更多框架引用

我曾经生成下面的代码

使用系统;
使用系统图;
使用MonoTouch.objc运行时;
使用单调的基础;
使用MonoTouch.UIKit;
名称空间有氧运动
{       
[基本类型(类型化(NSObject))]
公共部分接口CardInfo{
[出口(“卡号”)]
字符串卡号{get;set;}
[出口(“修订卡号”)]
字符串RedactedCardNumber{get;}
[出口(“到期月”)]
uint ExpiryMonth{get;set;}
[导出(“到期日”)]
uint ExpiryYear{get;set;}
[出口(“cvv”)]
字符串Cvv{get;set;}
[出口(“zip”)]
字符串Zip{get;set;}
[导出(“扫描”)]
布尔扫描{get;set;}
[导出(“卡片类型”)]
CardIOCreditCardType CardType{get;}
[静态,导出(“displayStringForCardType:usingLanguageOrLocale:”)]
字符串显示StringForCardType(cardType、cardType、字符串语言或Locale);
[静态,导出(“logoForCardType:”)]
NSObject LogoForCardType(CardCreditCardType cardType);
} 
[型号]
[基本类型(类型化(NSObject))]
公共部分接口CardIOPaymentViewControllerDelegate{
[导出(“userDidCancelPaymentViewController:”)]
无效UserDidCancelPaymentViewController(CardIOPaymentViewController paymentViewController);
[导出(“UserDidProviderCreditCardInfo:inPaymentViewController:”)]
void userdidprovidereditcardinfo(CardIOCreditCardInfo信息,CardIOPaymentViewController paymentViewController);
}
[基本类型(类型(UINavigationController))]
公共部分接口CardIOPaymentViewController{
[导出(“initWithPaymentDelegate:”)]
IntPtr构造函数(CardIOPaymentViewControllerDelegate aDelegate);
[导出(“initWithPaymentDelegate:scanningEnabled:”)]
IntPtr构造函数(CardIOPaymentViewControllerDelegate aDelegate,启用布尔扫描);
[导出(“appToken”)]
字符串AppToken{get;set;}
[导出(“语言或本地”)]
string LanguageOrLocale{get;set;}
[导出(“keepStatusBarStyle”)]
布尔KeepStatusBarStyle{get;set;}
[导出(“导航栏样式”)]
UIBarStyle导航BARSTYLE{get;set;}
[导出(“导航BartintColor”)]
UIColor导航BartintColor{get;set;}
[导出(“禁用模糊备份”)]
bool DisableBlurWhenBackgrounding{get;set;}
[出口(“到期日”)]
bool{get;set;}
[出口(“收集CVV”)]
bool CollectCvv{get;set;}
[导出(“collectZip”)]
bool CollectZip{get;set;}
[导出(“Showsfirstussealert”)]
bool showsfirstussealert{get;set;}
[导出(“useCardIOLogo”)]
bool-UseCardIolOgo{get;set;}
[导出(“禁用手动按钮”)]
bool DisableManualEntryButtons{get;set;}
[出口(“付款委托”)]
CardioPaymentViewControllerDeletePaymentDelegate{get;set;}
[导出(“带摄像头的CanReadCard”)]
布尔可以用摄像头读取卡片{get;}
[导出(“库版本”)]
字符串库版本{get;}
} 
}
我还将Card.IO网站中列出的框架添加到.linkswith文件中:

[程序集:LinkWith(“libCardIO.a”,LinkTarget.ArmV7 | LinkTarget.ArmV7s | LinkTarget.Simulator,ForceLoad=true
,Frameworks=“AVFoundation AudioToolbox CoreMedia CoreVideo MobileCoreServices OpenGLES QuartzCore安全UIKit”)]
然后我在我的应用程序中添加了一个项目引用到新创建的绑定项目中,但它没有编译。我在Xamarin的输出控制台中遇到此错误:

Process exited with code 1, command:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc  -Wl,-no_pie -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=6.1 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk  /Users/Sten/Dropbox/Code/Projects/Tabit/TabitOne_iPhone/TabitOne/obj/iPhoneSimulator/Debug/mtouch-cache/main.i386.cache.OHBLJlHbpZ74bpnhszg9JrCN8A8=.o -o /var/folders/bb/2tbfzn4n2dq6rsmtpv_jlmbr0000gq/T/tmp59582304.tmp/TabitOne -framework CFNetwork -framework AssetsLibrary -framework Accounts -framework CoreBluetooth -framework CoreTelephony -framework EventKit -framework EventKitUI -framework Foundation -framework CoreMotion -framework GameKit -framework GLKit -framework iAd -framework MapKit -framework MediaPlayer -framework MessageUI -framework NewsstandKit -framework OpenGLES -framework Social -framework StoreKit -framework Twitter -framework UIKit -framework PassKit -framework AddressBookUI -framework AudioToolbox -framework SystemConfiguration -framework AddressBook -framework AVFoundation -framework QuartzCore -framework CoreData -framework CoreGraphics -framework CoreImage -framework CoreLocation -framework CoreText -framework ImageIO -framework MobileCoreServices -framework Security -framework CoreMedia -framework CoreMIDI -framework CoreVideo -framework ExternalAccessory -framework AdSupport -framework QuickLook -lz -liconv -u _mono_pmip -u _monotouch_create_managed_ref -u _monotouch_release_managed_ref -u _monotouch_IntPtr_objc_msgSend_IntPtr -u _monotouch_IntPtr_objc_msgSendSuper_IntPtr -u _CloseZStream -u _CreateZStream -u _Flush -u _ReadZStream -u _WriteZStream -lmono-2.0 -lmonotouch-debug -L/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib -u _catch_exception_raise  -force_load /var/folders/bb/2tbfzn4n2dq6rsmtpv_jlmbr0000gq/T/tmp59582304.tmp/libCardIO.a
**Undefined symbols for architecture i386:**
  "**std::terminate()**", referenced from:
      -[CardIOGPURenderer dealloc] in libCardIO.a(CardIOGPURenderer.o)
  "___gxx_personality_v0", referenced from:
      Dwarf Exception Unwind Info (__eh_frame) in libCardIO.a(CardIOAnalytics.o)
      Dwarf Exception Unwind Info (__eh_frame) in libCardIO.a(CardIOGPURenderer.o)
      Dwarf Exception Unwind Info (__eh_frame) in libCardIO.a(CardIOAnimation.o)
      Dwarf Exception Unwind Info (__eh_frame) in libCardIO.a(CardIOAnalytics.o)
      Dwarf Exception Unwind Info (__eh_frame) in libCardIO.a(CardIOGPURenderer.o)
      Dwarf Exception Unwind Info (__eh_frame) in libCardIO.a(CardIOAnimation.o)
      Dwarf Exception Unwind Info (__eh_frame) in libCardIO.a(CardIOAnalytics.o)
      Dwarf Exception Unwind Info (__eh_frame) in libCardIO.a(CardIOGPURenderer.o)
      Dwarf Exception Unwind Info (__eh_frame) in libCardIO.a(CardIOAnimation.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

error MT5202: Native linking failed. Please review the build log.

好的,多亏了另一篇文章中的答案,我通过编辑我的应用程序的项目选项,页面“iOS构建”,字段“附加mtouch参数”来实现这一点,我在其中输入值:

-cxx -gcc_flags "-lstdc++"

仅供参考,i386代码被捆绑以支持iOS模拟器。(没有摄像头支持,只是一个备用手动输入模式)@tomwhipple谢谢你提供的信息!