Author Topic: GNU GCC Compiler for Android  (Read 8666 times)

Offline Alphys

  • Single posting newcomer
  • *
  • Posts: 2
GNU GCC Compiler for Android
« on: October 29, 2018, 01:09:06 pm »
Hello,

I'm trying to compile my programs (unsing the SDL library) for another plateforms than Windows, like Android or iOS.

I set up the search directories  for the "GNU GCC Compiler for Android" as previously, i. e. for the "GNU GCC Compiler", that got no problems.

When I try to rebuild the entire project, I get the following message :

Tried to run compiler executable 'C:\ndk/bin/arm-linux-androideabi-gcc.exe', but failed!
Tried to run compiler executable 'C:\ndk/arm-linux-androideabi-gcc.exe', but failed!

I read it could be an error in the name or in the path, and I actually noticed there isn't any folder named "ndk" in "C:\" folder. So I looked for but the files explorer found nothing.

I just re-installed c::b 17.12 with mingw (the older version didn't included that compiler for Android), the older linking parameters had been kept. I didn't place it in the default folder ("program file (x86)"), perhaps should I ? In that case, why can I change the installation folder ?

Thanks for answer !

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: GNU GCC Compiler for Android
« Reply #1 on: October 29, 2018, 03:10:33 pm »
Where do you have installed the compiler?
What is the path to this compiler?
What have you set in the compiler settings and where?
What have you entered in Settings->Compiler->Select your android compiler from drop down menu->toolchain executables->path?

Quote
I just re-installed c::b 17.12 with mingw (the older version didn't included that compiler for Android)
Codeblocks does not ship with the android compiler... You have to install it by yourself


Offline hidefromkgb

  • Multiple posting newcomer
  • *
  • Posts: 50
Re: GNU GCC Compiler for Android
« Reply #2 on: October 29, 2018, 03:13:55 pm »
Where do you keep your Android NDK?
To make it work again, select the appropriate compiler from the list (see Settings → Compiler → Global → Selected compiler) and correct its file paths (Settings → Compiler → Global → Toolchain executables) to the ones you actually have in your system.
Just simply reinstalling C::B won`t help, as it doesn`t ship equipped with an Android compiler.

Offline Alphys

  • Single posting newcomer
  • *
  • Posts: 2
Re: GNU GCC Compiler for Android
« Reply #3 on: October 30, 2018, 09:39:33 am »
Thanks for answering !

->  The compiler is installed in the default folder : C:\MinGW\mingw32-gcc.exe in Toolchain executable (for "GNU GCC Compiler") and for the other, C:\ndk\arm-linux-androideabi-gcc.exe is written

-> In Linker settings - Other link options: -lSDL2main -lSDL2 [and ttf, image and mixer]

-> Settings - Compiler - toolchain executables - path : C:\ndk

But I hadn't downloaded any android compiler, I saw there was "GNU GCC Compiler for android" on my friend's c::b newest version, then I tought I could compile my programs just using an updated c::b version (that compiler wasn't included on mine).

I'm going to loofk for an android compiler on the web, and then install it in the good folder...