开发者

Is it possible to use window lib on Android

Here is my case, I have a window library + headers, but no source code. I want to use this lib on an android tablet. To make the porting effort minimal, I am thinking about three possibilities.

  1. Android app + windows library.

But is this even possible?

  1. java lib + windows lib + android app

I am not sure if I am correct. but I heard pure java app is not supported on Android. What I am planning is to make a java lib which links to that windows lib, then make a jar to include them, finally make a separate Android app using this jar.

  1. Qt app + windows lib on android app It is possible to run qt app on android. So if I create a standalone Qt App includ开发者_StackOverflowing that windows lib first. Run this Qt App on android device?

Please shed some light! Many thanks!

Br, Tao


The short answer is "no, you cannot". Windows library (I assume it's a .dll or a .lib) is compiled on windows, with windows OS architecture in mind. That code would not be usable or even parseable on any other platform. It's like saying, "I have this wheel from my Mack truck, and I want to put it on my Mercedes C-class. How can I do it?"

If you don't have the source code for the lib, the you're out of luck. Moreover, even if you did, most likely it used some specific windows API that are not available on Android or any other OS, so you'd end up rewriting it anyway. As you have the header file, you are already part-way there, as you don't need to re-invent the interface.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜