Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8120287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:06:13+00:00 2026-06-06T05:06:13+00:00

I writing toolchain.cmake file for Linaro toolchain. include(CMakeForceCompiler) set(CMAKE_CROSSCOMPILING TRUE) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_VERSION 1)

  • 0

I writing toolchain.cmake file for Linaro toolchain.

include(CMakeForceCompiler)
set(CMAKE_CROSSCOMPILING   TRUE)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR "armv7-a")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wno-psabi -frtti -fexceptions" )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wno-psabi -fexceptions" )
set(CMAKE_C_COMPILER /home/stranger/linaro/android-toolchain-eabi/bin/arm-linux-androideabi-gcc)
set(CMAKE_CXX_COMPILER /home/stranger/linaro/android-toolchain-eabi/bin/arm-linux-androideabi-g++)
CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" GNU)
CMAKE_FORCE_CXX_COMPILER("${CMAKE_CXX_COMPILER}" GNU)
set(CMAKE_FIND_ROOT_PATH  home/stranger/linaro/android-toolchain-eabi/arm-linux-androideabi)
include_directories( SYSTEM /home/stranger/android-ndk-r8/platforms/android-14/arch-arm/usr/include)
include_directories( SYSTEM /home/stranger/android-ndk-r8/sources/cxx-stl/gnu-libstdc++/include)
include_directories( SYSTEM /home/stranger/android-ndk-r8/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include)

I run cmake:

cmake -DBUILD_ANDROID=On -DCMAKE_TOOLCHAIN_FILE=<path to this toolchain.cmake>  -DCMAKE_BUILD_TYPE=Release <path to my cmake project>

But at compile time, i had error about exceptions, instead of defined compiler flags in toolchain file:

error: exception handling disabled, use -fexceptions to enable

As far as I can understand my CMAKE_C_FLAGS_RELEASE, CMAKE_CXX_FLAGS_RELEASE has no effect. Why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:06:16+00:00Added an answer on June 6, 2026 at 5:06 am

    Problem solved, my mistake. I use set(CMAKE_CXX_FLAGS "<flags>") against set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}<flags>" in main project. I was confused, because this CMakeLists.txt works correctly for android-cmake and Google-NDK (instead of all android-cmake toolchain flags was rejected).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

//Writing a letter #include <iostream> using namespace std; int main() { string first_name; //Name
Writing to a file is not working after hosting the web application, whereas they
I'm writing inline assembly statements using a GNU-based toolchain, and there are three instructions
Writing a file utility to strip out all non-ASCII characters from files. I have
writing to a text file is working good...But my problem is text file is
Writing a dictionary application for android. Want to set translation direction in accord with
writing a server that runs on linux (Ubuntu) using mono. and a client that
Writing a test app to emulate PIO lines, I have a very simple Python/Tk
Writing documentation in html requires some code examples. What to do with characters that
Writing a python program, and I came up with this error while using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.