News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

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

Started by amarty, November 15, 2012, 02:20:07 AM

Previous topic - Next topic

amarty

Quote from: dmoore on November 16, 2012, 12:54:34 AM
Didnt we once have issues with mingw installed on d drive and C::B on c drive on win 7? Did you try putting everything on one drive?

One MinGW shipped with C::B, placed in C::B folder and works fine in C::B. Other MinGW on disk D installed for other reasons, and also fulfills its mission. I have no problems with MinGW in C::B, problem is with NDK ;)

stahta01

Quote from: dmoore on November 16, 2012, 12:54:34 AM
Didnt we once have issues with mingw installed on d drive and C::B on c drive on win 7? Did you try putting everything on one drive?

IIRC, there was a version of MinGW that had the issue NOT CB itself.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MortenMacFly

Quote from: amarty on November 16, 2012, 01:51:02 AM
I have no problems with MinGW in C::B, problem is with NDK ;)
Well the only difference between me (where it works) and you is that  am using a recent build. So let me encourage you again to try 12/11-RC1. Since 10/05 we did change the way how compiler path's are handled.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

dmoore

Have you tried setting the tool chain commands as a full path to the command?

Or how about setting a known executable that works just in the C tool chain (something located in a path that works such as your mingw) to get around the "invalid" compiler message, then compile a C++ file with the C++ tool chain command still set for the NDK as you have now and see what message you get.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

amarty

Quote from: MortenMacFly on November 16, 2012, 06:49:25 AM
Quote from: amarty on November 16, 2012, 01:51:02 AM
I have no problems with MinGW in C::B, problem is with NDK ;)
Well the only difference between me (where it works) and you is that  am using a recent build. So let me encourage you again to try 12/11-RC1. Since 10/05 we did change the way how compiler path's are handled.

Ok. Can you give the link to download this version of C::B? I can't find it on C::B site

MortenMacFly

Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

amarty

Quote from: MortenMacFly on November 17, 2012, 05:18:54 PM
Quote from: amarty on November 17, 2012, 04:58:41 PM
Ok. Can you give the link to download this version of C::B? I can't find it on C::B site
Use BerliOS here:
http://developer.berlios.de/project/showfiles.php?group_id=5358

Can I install new version over previous, or I need first to uninstall 10.05?

stahta01

You SHOULD use an empty folder to do the installation.

DO NOT INSTALL TO THE SAME FOLDER UNLESS CONTENTS WAS ALL DELETED.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

tdakic

Has this issue been resolved?

I'd like to do the same - use C::B for Android NDK compiler.

Thanks,

Tamara

-----
Quote from: stahta01 on November 18, 2012, 07:46:36 PM
You SHOULD use an empty folder to do the installation.

DO NOT INSTALL TO THE SAME FOLDER UNLESS CONTENTS WAS ALL DELETED.

Tim S.


stahta01

#39
Quote from: tdakic on February 21, 2013, 03:33:49 AM
Has this issue been resolved?

I'd like to do the same - use C::B for Android NDK compiler.

Thanks,

Tamara

-----
Quote from: stahta01 on November 18, 2012, 07:46:36 PM
You SHOULD use an empty folder to do the installation.

DO NOT INSTALL TO THE SAME FOLDER UNLESS CONTENTS WAS ALL DELETED.

Tim S.


Since my post was never an issue; but, directions. I would say your question makes no sense to me.

Edit: If you are asking do user still do user errors, the answer is yes.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

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



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

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

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.

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

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

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.

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

Tim S.

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.