Xamarin.Forms + native library OpenCV - c++

I'm trying to write an application using Xamarin.Forms. But I need to connect to the project native library OpenCV.
In tutorial i see how connect to the ios or android project. But I want use this native library in share code.
Library OpenCV has Android, Linux, Windows, iOS and Source Code versions. I would like to write code for this library once.
this is url for this library http://opencv.org/downloads.html
Please, help solve the problem

I don't think there's a way to have one codebase when using native bindings on iOS and Android. However, you can automate everything by using SWIG (http://www.swig.org). Short example here: http://blog.reblochon.org/2013/01/c-bindings-for-monotouch-using-swig.html
There's also .NET port of OpenCV called EMGU which works fine with Xamarin.

Related

iOS problems using c++ code which invoke epoll()

I knew that iOS apps could use shared C++ library. However, now I have some C++ code that uses epoll() function, and iOS is based on a BSD kernel that doesn't have epoll() function, so when I integrate these C++ code to my iOS xcode project, there are some compile error, such as "sys/epoll.h file not found" and so on.
How could I do now? Thanks for any help!

Pjsip2.2 PJSUA2 API for iOS

I've upgraded pjsip 2.2 with the new PJSUA2 API.
It's written in C++ and the documentation has given the use example for Java/Python applications as well. But I can't find any example for iOS application.
I'm not very familiar with using C++ in Objective-C. I was trying to replace the existing pjsua.h with pjsua2.hpp... It seems not even linked to the lib.
Any advice?

Is there a c++ bind can cross v8 and JavaScriptCore?

Im looking for a script engine for game developing. I dont like lua (because of it's syntax and features), Im very like js, so I want to use google V8, but seems it is not very friendly in iOS? So, Is there a c++ bind can cross v8 and JavaScriptCore? In iOS use JavaScriptCore and others use V8 to bind the same C++ code.
I've started a project for this. It currently supports building and running the examples included in version 3.14 of the V8 project, as well as Node version 0.10.
https://github.com/flyover/v8like
I've also made a fork of the Node project with project files for iOS and OS X including targets for compiling against V8 using the simulator (define USE_SIMULATOR) and the v8like project.
https://github.com/flyover/node
As I know, there is no such bind library. When I worked in game dev company in the past year, we created our own bind. But it is proprietary code. We used JavascriptCore on iOS and V8 for Android.
So it's possible, but to my regret I can't help you with code.

Compiling/Running C++ code on iPhone without convert to Objective C

I wrote my project on Visual studio 2010 and I used on it tesseract ocr library , Opencv and Cvblob , and now want change it to from desktop application to mobile application on iPhone so can I compiling and running it without convert to Objective C ?!
Well, you can compile and run straight C or C++ on iOS. You can even inline it in Objective-C classes.
But you will still need Xcode (and thus a Mac) to build and deploy, and you will not be able to just use code you built against Windows frameworks.
It seems tesseract does not currently support iOS, so if you require that and can't port it yourself, you probably can't just port your app to iOS without rewriting major parts of it. But that isn't just a question of programming languages.

C++ app for IPAD with C++Lucene library

I am planning to build an app in C++ for ipad. I have never build any app for ios. I want to know whether is it possible to write a C++ app using Lucene library in ipad. Can i write the code in visual c++ and compile it in xcode. Can i use the same code to work in mac os as well? I really wanted to build the app in Java so it works every where but unfortunately I pad doesnt support java.
Please provide me some good suggestions to build this app.
Thank you.
No. You can't build for iPad in Visual Studio.
You can include C++ in "Objective-C++" files, named .mm, but you will have to learn a minimum of Objective-C in which to include your C++ code.
As for using the same code for mac, it depends on how well you separate your logic from your display code - you can reuse some code, but you can't simply hit "build for Mac" and have iPad apps magically run on the Mac. You'll have to, at the very least, build a totally separate interface.
Building apps for iOS, etc requires some simple steps :
Buy a Mac
Learn some Objective-C
There is no other way around that makes sense.