简体   繁体   中英

Wrapping the whole C++ application to java?

I currently work for a company which gave me an application implemented by a former student. They completely wrapped (even the main) an existing C++ application with SWIG.

The application was first designed to work on a desktop and now they want to make it work on an android phone.

My questions are:

  1. Is that possible for the application to work knowing they didn't succeed to wrap all the libraries?

  2. Is there another way to do this?

  3. Is it necessary to write the main in Java and call the C++ libraries?

Any idea will be welcome!

I have doubts about there is a automatic utility like SWIG will work to convert PC -> Android - Android OS have significantly different architecture.

Look at Android NDK - it is a development kit supporting the features called JNI in usual Java applications. You can include C++ libraries in your Android applications with Android NDK. So it is the way to develop cross-platform applications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM