User forums > Using Code::Blocks

How to set up C::B for Android NDK compiler?

<< < (9/9)

tdakic:
Oh, I just want to know if I anyone managed to use C::B with NDK. It seems that one user was trying and gave up? I think I know what I am doing and I am not afraid of compiling C::B from source, but would prefer to avoid large amounts of work.

Thanks,

Tamara

stahta01:

--- Quote from: tdakic on February 23, 2013, 04:01:46 am ---Oh, I just want to know if I anyone managed to use C::B with NDK. It seems that one user was trying and gave up? I think I know what I am doing and I am not afraid of compiling C::B from source, but would prefer to avoid large amounts of work.

Thanks,

Tamara



--- End quote ---

That person likely do NOT know how to install a Compiler and then setup Code::Blocks to use it.

Tim S.

empty head:
There appears to be a problem in Code::Blocks when setting up a new compiler for Android.

Having set up the new compiler and compiled the current project successfully, after exiting Code::Blocks and restarting it the project will no longer compile.

To get the project to compile again go to Settings->Compiler->Toolchain executables and set the compiler's installation directory to some other path and click OK. Then go to Settings->Compiler->Toolchain executables again and set the correct (*) compiler installation directory. Click OK. Now the project compiles successfully. However, the problem will occur again after exiting Code::Blocks and restarting it.

A permanent solution to the problem is to also set the compiler path in the the 'Additional Paths' section.
An example:
  In the 'Compiler's installation directory' put:
    E:\android-ndk-toolchain\arm-linux-androideabi (*)

  And in the 'Additional Paths' put:
    E:\android-ndk-toolchain\bin

* note: This is in fact not the correct location but one that Code::Blocks accepts.

stahta01:

--- Quote from: empty head on May 20, 2013, 09:22:43 pm ---
An example:
  In the 'Compiler's installation directory' put:
    E:\android-ndk-toolchain\arm-linux-androideabi (*)

  And in the 'Additional Paths' put:
    E:\android-ndk-toolchain\bin

* note: This is in fact not the correct location but one that Code::Blocks accepts.

--- End quote ---

What did you try as the correct value in 'Compiler's installation directory'?

Tim S.

empty head:

--- Quote from: stahta01 on May 20, 2013, 09:32:46 pm ---
--- Quote from: empty head on May 20, 2013, 09:22:43 pm ---
An example:
  In the 'Compiler's installation directory' put:
    E:\android-ndk-toolchain\arm-linux-androideabi (*)

  And in the 'Additional Paths' put:
    E:\android-ndk-toolchain\bin

* note: This is in fact not the correct location but one that Code::Blocks accepts.

--- End quote ---

What did you try as the correct value in 'Compiler's installation directory'?

Tim S.

--- End quote ---

My Android toolchain bin directory is E:\android-ndk-toolchain\bin. So, for the compiler's installation directory I specify E:\android-ndk-toolchain. but this is not accepted by Code::Blocks.

It seems to me that the reason Code::Blocks likes E:\android-ndk-toolchain\arm-linux-androideabi for the directory is that there is also a bin folder in there which contains g++.exe but this is not the correct .exe. The correct .exe for Android is arm-linux-androideabi-g++.exe in E:\android-ndk-toolchain\bin.

Navigation

[0] Message Index

[*] Previous page

Go to full version