GLBasic forum

Main forum => GLBasic - en => Topic started by: msx on 2016-Apr-22

Title: [SOLVED] Error compiling for android (ld.exe: cannot find -lGLBasicAndroid)
Post by: msx on 2016-Apr-22
I have a problem compiling for android, can anyone help me fix it ?. This is the error I get but do not understand.

Android libraries downloaded from post of spacefractal. (GLB ver. 14.106).


Code (glbasic) Select
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.037 SN:5e5ce0e7 - 3D, NET
Wordcount:1352 commands
compile+link:
Q:/Compiler/platform/android/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: cannot find -lGLBasicAndroid
collect2: ld returned 1 exit status
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 26.5 sec. Time: 15:21
Build: 0 succeeded.
*** 1 FAILED ***


Thanks
Title: Re: Error compiling for android
Post by: erico on 2016-Apr-22
Did you unzip the android platform into its directory?
Title: Re: Error compiling for android
Post by: msx on 2016-Apr-22
Unzipped in the same location as Include and Win32.
Title: Re: Error compiling for android
Post by: spacefractal on 2016-Apr-22
glbasic finds the platform, so its might have unpacked correctly. Howover can you try to move glbasic outside Program Files to avoid the annoying Q drive (you dont need to reinstall, just move it).

ps. btw im forget to update the update with possible to remove the inapp store, when its not used (which working fine now, its removes Java lines directly under compiling when BILLING is not found). Do that in this week. Sorry about that.
Title: Re: Error compiling for android
Post by: msx on 2016-Apr-24
Still does not work. I tried it on two different computers with XP and Windows 10 and get the same error. I tried also with GLB v12 and the same android libraries and works properly. I have something wrong with GLB v14 and can not find the problem. Any ideas?.

P.D: There is no virtual drive Q. I think that's why I get the error. But I've seen that before the Q drive was created and not now.
Title: Re: Error compiling for android
Post by: msx on 2016-Apr-25
I think I will use the v12 that works well
Title: Re: Error compiling for android
Post by: erico on 2016-Apr-25
That is a very strange error you have  and i hace never seen it before. I recently formated my machine win7 64b and installed java and glb 14. Compilation to android went all fine and smooth. Way different than my first attempt.
While i have no idea what this error means, I have to advise the use of v14 because spacefractals improvement are just superb on many levels(i just recently tried. Was using v12 before) I will take a closer look at it when home later today.
Title: Re: Error compiling for android
Post by: spacefractal on 2016-Apr-25
Seens strange. It'd also works with my v14 as well (even I'm so use v12 most). Not 100% sure  what happens. I'm do re-upload when time (Eventuelly if some files is missing).

Yes I'm did fixed various issues in glb source code (Etc got rid of internal media copy and doing that on the fly and rotation).
Title: Error compiling for android
Post by: msx on 2016-Apr-25
Yes, it is strange because in one of the attempts worked without changing anything.

Offtopic: spacefractal if you have time, could you add accuracy to GPS routines?. I've tried it, but it does not work.
Title: Re: Error compiling for android
Post by: spacefractal on 2016-Apr-25
Did you added the required lines to your androidmanifest.xml (which is required to use GPS)?

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
Title: Re: Error compiling for android
Post by: msx on 2016-Apr-25
your routines GPS works correctly however I tried unsuccessfully to add accuracy.
Title: Re: Error compiling for android
Post by: spacefractal on 2016-Apr-25
Actuelly its not mine code, the GPS code was coded by FiveSprite, and yes its quite old code. GPS Accuracy have newer been that good. Its depend how well you have phone coverage is on your area.

Also when you see on Google Map, its also quite not very accuracy at all, which is first fixed when the phone is moved a bit.....

Here a real GPS is still much better.

Also im have not checked it out since. GPS was one of the very first thing for Android Extras, and im not personal newer checked it.

mightbeen this could help:
http://stackoverflow.com/questions/8444538/android-gps-takes-a-while-to-be-accurate
Title: Re: Error compiling for android
Post by: erico on 2016-Apr-26
Ok, here is my guess (don´t take it seriously, just a guess).

I think it could be either a problem with your android platform or maybe at last the java version.
What system are you running? What version of jdk?

It seems to me ld.exe failed because it is either bugged out of an unzip or it doesn´t exist at all.

Did you download the android platform from the oficial place?
http://www.glbasic.com/platform/v14/

Let me know how it is going, my hints are quite dumb but I really don´t know what that error is about as I never saw it before and my installation of latest v14+android worked out the box first shot.

edit:it is probably not java since you did manage to compile on v12, try the android from this last link then.
Title: Re: Error compiling for android
Post by: spacefractal on 2016-Apr-26
For me it's look like a missing file.
Title: Re: Error compiling for android
Post by: msx on 2016-Apr-26
Thank you both for your help. I can not test until tomorrow.
Title: Re: Error compiling for android
Post by: msx on 2016-Apr-28
I'm very clumsy, the problem was that I have the Android folder within a folder Android. Fixed, thanks for your help.  :S
Title: Re: Error compiling for android
Post by: erico on 2016-Apr-28
haha good record! :D
Glad to hear all is fine, it was really quite a strange error.

edit: you might want to change the topic to add something specific so it could help people further, like "Error compiling for android - ld.exe"?
I´m not sure this would be useful but maybe to others to reach it easily as there are already many threads with that very name.