Author Topic: How to set up C::B for Android NDK compiler?  (Read 59921 times)

Offline amarty

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: How to set up C::B for Android NDK compiler?
« Reply #30 on: November 16, 2012, 01:51:02 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 ;)

Online stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
Re: How to set up C::B for Android NDK compiler?
« Reply #31 on: November 16, 2012, 03:15:22 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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: How to set up C::B for Android NDK compiler?
« Reply #32 on: November 16, 2012, 06:49:25 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: How to set up C::B for Android NDK compiler?
« Reply #33 on: November 16, 2012, 04:30:47 pm »
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.

Offline amarty

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: How to set up C::B for Android NDK compiler?
« Reply #34 on: November 17, 2012, 04:58:41 pm »
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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: How to set up C::B for Android NDK compiler?
« Reply #35 on: November 17, 2012, 05:18:54 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
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline amarty

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: How to set up C::B for Android NDK compiler?
« Reply #36 on: November 18, 2012, 05:12:46 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?

Online stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
Re: How to set up C::B for Android NDK compiler?
« Reply #37 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline tdakic

  • Single posting newcomer
  • *
  • Posts: 2
Re: How to set up C::B for Android NDK compiler?
« Reply #38 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

-----
You SHOULD use an empty folder to do the installation.

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

Tim S.


Online stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
Re: How to set up C::B for Android NDK compiler?
« Reply #39 on: February 22, 2013, 06:56:29 pm »
Has this issue been resolved?

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

Thanks,

Tamara

-----
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.
« Last Edit: February 22, 2013, 06:58:27 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline tdakic

  • Single posting newcomer
  • *
  • Posts: 2
Re: How to set up C::B for Android NDK compiler?
« Reply #40 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


Online stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
Re: How to set up C::B for Android NDK compiler?
« Reply #41 on: February 23, 2013, 04:16:10 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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline empty head

  • Single posting newcomer
  • *
  • Posts: 4
Re: How to set up C::B for Android NDK compiler?
« Reply #42 on: May 20, 2013, 09:22:43 pm »
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.

Online stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
Re: How to set up C::B for Android NDK compiler?
« Reply #43 on: May 20, 2013, 09:32:46 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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline empty head

  • Single posting newcomer
  • *
  • Posts: 4
Re: How to set up C::B for Android NDK compiler?
« Reply #44 on: May 20, 2013, 09:49:44 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.