Project

General

Profile

Wt on Android build

Added by Vyacheslav Blinov over 11 years ago

Hi Wt team!

I'm building Wt for android with latest google ndk, so far had mostly little problems with boost and wchar_t and build configuration.

Maybe I could update wiki on building Wt for Android with android-ndk-r8?

Also I got problem with Wt codebase, looks like src/http/Android.C was out of care for some time and can`t be built with current codebase (it refers to instance() method of http::server::Server which is not there).

As far as I understood this *.C file used to instantiate Wt Server from java method isn`t it? I'm disabled it for a moment but not quite shure if I'll have a problems about it later on (currently fighting with src/Wt/Dbo/backend/libwtdbosqlite3.a(sqlite3.obj undefined references to boost::regex )


Replies (3)

RE: Wt on Android build - Added by Wim Dumon over 11 years ago

Hello,

It has indeed been a while since I've last built Wt on android, and I expect indeed that both ndk and boost have improved a lot since my last tests. An update of the wiki would be appreciated!

It seems that WServer now has a httpPort() method that you can use, and WServer does have an instance() method.

The boost regex problem can probably be solved by adding BOOST_REGEX_LIB to the TARGET_LINK_LIBRARIES in a CMakeLists.txt file in src/Wt/Dbo and/or src/Wt/Dbo/backend at the appropriate locations.

BR,

Wim.

RE: Wt on Android build - Added by Vyacheslav Blinov over 11 years ago

Hey Wim.

So far I still expirience problems.

Looks like boost has quite some bugs in treating platforms without wchar_t in spirit and regex code, I'll try to work with boost-on-android on that fixes.

Also I found some things wrong in Wt CMake file, like no defines taken from FindBoost. Correct me if I wrong, but you should define what was defined then Boost was built.

Looks like android vars in CMake file has no comments and CACHE section as well, and I didn`t found if they are applicatable somewhere. Toolchain file missing as well, atm I'm just defined compilers, and it`s working for me. Too bad I had no success with android-cmake either.

ATM I have only libwt and libwthttp compiled successfully, but linking test app fails (I'm using statical linkage because of problems with gcc 4.4.3 used in r8).

RE: Wt on Android build - Added by Vyacheslav Blinov over 11 years ago

Just to update this thread:

Wim, the problem with boost was, that boost does not have wchar defines related to handling platforms without wchar_t in some of it places, like in spirit and regex.

After spending many time fixing boost (spirit and regex), and paralelly working on my project I realised I'll be easier to use JWt instead, and my project is already running it in conjuction with jetty pretty well (it took me just 30 minutes to create working hellowt project).

    (1-3/3)