Ask Your Question
0

Compiling Opencv for Android using clang

asked 2016-03-31 05:10:07 -0600

I am able to build opencv sdk for Android using gcc but am not able to figure out how to do the same using clang. I see that there are options for clang in the python build script but when I actually try to enable those options another part of the build process complains saying that only the gcc specific options can be used.

Did anyone succeed in compiling with clang ?

Any help is greatly appreciated.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-04-01 03:52:13 -0600

mshabunin gravatar image

Here in the script, the toolchains for each ABI are set. You have to change gcc to clang, for example:

arm-linux-androideabi-4.8 --> arm-linux-androideabi-clang3.5

Here is the list of supported toolchains.

Or you can disable manual toolchain selection by removing line 136 from the script, but in this case there can be problems with cmake scripts as they have not been adapted to the latest NDKs.

edit flag offensive delete link more

Comments

You also have to change test_cmake_build.py if you build all.

dwoods gravatar imagedwoods ( 2016-04-12 19:32:29 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-03-31 05:10:07 -0600

Seen: 1,976 times

Last updated: Apr 01 '16