Monday, August 29, 2016

laztoapk demo compliation error: cannot find crtbegin_so.o

with the help of laztoapk v0.9.0.35, which speeds up the setup in windows platform.

However, I hit below error when complile the example project.

D:\laztoapk\downloads\laz4android\fpc\3.0.0\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find crtbegin_so.o


after reading http://wiki.freepascal.org/Android_tutorial#Compile_the_demo_.22androidlcl.22  

I notice the library path in default value of "project option/compilation option/path / library " is not correct, where it is
D:\android-ndk-r10e\platforms\android-8\arch-arm\usr\lib\;D:\android-ndk-r10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.9\

they are not my actual path,  Missing the "prefix" path  -   "D:\laztoapk\downloads"  for my environment.

Corrected them as shown below, and recompilation succeed!


D:\laztoapk\downloads\android-ndk-r10e\platforms\android-8\arch-arm\usr\lib\;D:\laztoapk\downloads\android-ndk-r10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.9\


 and I contributed the answer to http://forum.lazarus.freepascal.org/index.php/topic,22414.30.html


Hope this help the author if this is a bug.