Hi all

I am new to this mailling list, so bear with me if this is a FAQ (I have
googled my *** off before coming here).

First some environment info: Latest version of Mac OS X, Mono, MonoDevelop
and MonoTouch.

I am trying to use VSBarcodeReader and this is how far I got:
In one of their header-files we have:

@interface VSBarcodeReader : NSObject {
}

@property (assign) BOOL decodeEAN8;
@property (assign) BOOL decodeUPCE;

-(id) init;
-(void) reset;
-(BOOL) readFromImage:(CGImageRef)img readHeight:(int)readHeight
from:(int*)left to:(int*)right digits:(int*)res;
-(BOOL) readFromImageBuffer:(CVImageBufferRef)img
readHeight:(float)readHeight from:(float*)left to:(float*)right
digits:(int*)res;
@end

So I created VSBarcodeReader.cs:

[BaseType (typeof (NSObject))]  
interface VSBarcodeReader {  
    [Export ("decodeEAN8", ArgumentSemantic.Assign)]  
    bool DecodeEAN8 { get; set; }
                
    [Export ("decodeUPCE", ArgumentSemantic.Assign)]  
    bool DecodeUPCE { get; set; }
}

I compiled the dll with:
btouch -e out:VSBarcodeReader.dll VSBarcodeReader.cs
 
I link it all with:
-v -gcc_flags="-L${ProjectDir} -lsqlite3.0 -framework CoreVideo -framework
CoreMedia -lVSBarcodeReader -Objc"

I am able to load/run my app, but when I try to access the static lib by
writing:
VSBarcodeReader reader = new VSBarcodeReader();
reader.DecodeEAN8 = true;

It crashes. I have tried using btouch differently, linking in other ways and
so on, but no luck.

I have checked that libVSBarcodeReader.dll is NON-thumb.

I got a lille info from the crash:
Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   app                         0x011ad2e8 mono_error_init (mono-error.c:54)
1   app                         0x010f3068 mono_method_signature_checked
(loader.c:2209)
2   app                                 0x010f3830 mono_method_signature
(loader.c:2354)
3   app                                 0x01036004 mono_jit_runtime_invoke
(mini.c:5713)
4   app                                 0x0113e7ac mono_runtime_invoke
(object.c:2756)
5   app                                 0x011e7bcc monotouch_trampoline
(monotouch-glue.m:652)
6   app                                 0x00ef5e80
wrapper_managed_to_native_MonoTouch_ObjCRuntime_Messaging_bool_objc_msgSend_intptr_intptr
+ 60
7   app                                 0x00b8ad28
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
+ 192
8   app                                 0x01036270 mono_jit_runtime_invoke
(mini.c:5746)
9   app                                 0x0113e7ac mono_runtime_invoke
(object.c:2756)
10  app                                 0x011e7bcc monotouch_trampoline
(monotouch-glue.m:652)

Any ideas?

Best regards
db

--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Binding-and-linking-to-3-party-static-library-tp3536257p3536257.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to