S
S
Slaxik2018-12-04 23:11:51
Android
Slaxik, 2018-12-04 23:11:51

Compiling an android application on Ubuntu?

cmake runs without errors with these options

CC=clang CXX=clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -ldl -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D BUILD_TAG="android" -D BOOST_ROOT=/opt/android/boost_1_65_1 -D BOOST_LIBRARYDIR=/opt/android/boost_1_65_1/android32/lib -DCMAKE_C_COMPILER="/usr/bin/clang" -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D BOOST_IGNORE_SYSTEM_PATHS_DEFAULT=ON

When launching the make build, an error
error: unknown target CPU 'armv7-a'
Explain what the error means, because for the clang assembler we also set a percent. unclear help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2018-12-05
@jcmvbkbc

Explain what the error means, because for the clang collector we set the percent. unclear help.

The error means that clang or clang++ does not know the armv7-a architecture. I suspect that you are building on x86 and clang and clang++ are compilers for x86. If so, you need to replace CC=clang and CXX=clang++ with cross compiler names under arm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question