Recent

Author Topic: LAMW (solved): linking error, missing files?  (Read 2657 times)

n000b

  • Newbie
  • Posts: 2
LAMW (solved): linking error, missing files?
« on: February 06, 2024, 06:29:51 pm »
I installed LAMW Manager on Win10 64bit from https://github.com/dosza/LAMWManager-win.

Then followed instructions from the PDF here to create a test program: https://drive.google.com/file/d/1CeDDpuDfRwYrKpN7VHbossH6GfZUfqjm/view.

When building, I get these errors:
Code: [Select]
C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.bfd.exe: cannot find crtbegin_so.o
C:\lamw_manager\LAMW\sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.bfd.exe: cannot find -lc
...
Error while linking

Tried several times to reinstall LAMW, tried with a blank project, with the same result.

Am I missing some files or is some path wrong? Can't find anything related to those files under the SDK folder.

The project options dialog (1st pic) is a bit different than in the PDF (2nd pic).
« Last Edit: February 06, 2024, 11:19:33 pm by n000b »

Thaddy

  • Hero Member
  • *****
  • Posts: 19258
  • Glad to be alive.
Re: LAMW: linking error, missing files?
« Reply #1 on: February 06, 2024, 07:57:54 pm »
LAMW manager is NOT written by jmpessoa, who wrote LAMW, so I consider that you used the wrong place to look for a functional LAMW. 
objects are fine constructs. You can even initialize them with constructors.

nobody.00

  • New Member
  • *
  • Posts: 25
Re: LAMW: linking error, missing files?
« Reply #2 on: February 06, 2024, 08:01:59 pm »
Try reset

Open cmd as admin
c:\lamw_manager\lamw_manager --reset

Thaddy

  • Hero Member
  • *****
  • Posts: 19258
  • Glad to be alive.
Re: LAMW: linking error, missing files?
« Reply #3 on: February 06, 2024, 08:23:25 pm »
No, just wait for an answer by jmpessoa.
objects are fine constructs. You can even initialize them with constructors.

marcos-ebm

  • Jr. Member
  • **
  • Posts: 51
Re: LAMW: linking error, missing files?
« Reply #4 on: February 06, 2024, 09:10:10 pm »
[using the translator]

The best way to install LAMW is to do it manually,

Since you use Windows, do the procedure in Option A from this link
https://github.com/jmpessoa/lazandroidmodulewizard

It may seem difficult at first, but if I can do it, you can too :)

If you have any problems, tell us

I never liked using Lamw_manager, fpcupdelux, because it always gave an error
Lazarus 3.0 / LAMW 0.8.6.4 - Gradle 8.5 - Jdk 21 - Ndk 21e - Windows 11

n000b

  • Newbie
  • Posts: 2
Re: LAMW: linking error, missing files?
« Reply #5 on: February 06, 2024, 10:22:24 pm »
Installed everything from option A and did the Infrastructure Setup.

Now a blank form compiles, but when adding a button, an error dialog "Error moving component jButton1;jButton" pops up, and message log has "Error: unit not found: AndroidWidget".

The packages seemed to install correctly, and the Android components were added to the component tabs.

The unit file is in:
C:\laz4android2.2.2\components\lazandroidmodulewizard-master\android_bridges\

Shouldn't installing packages automatically handle the paths or do those need to be added by hand?

Edit1: Added that folder to project options, now it at least compiles.
Edit2: Maybe I forgot to restart Lazarus, tried the same with a new project and it finds the unit now without adding its path to the project.
Edit3: Got Hello World working on the phone!
« Last Edit: February 06, 2024, 10:40:59 pm by n000b »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: LAMW: linking error, missing files?
« Reply #6 on: February 06, 2024, 10:33:47 pm »
Quote
tried the same with a new project and it finds the unit now without adding its path to the project.....

Good!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

marcos-ebm

  • Jr. Member
  • **
  • Posts: 51
Re: LAMW (solved): linking error, missing files?
« Reply #7 on: February 06, 2024, 11:27:41 pm »
Whenever you start a new project, check the Add support Library option (see image)



Lazarus 3.0 / LAMW 0.8.6.4 - Gradle 8.5 - Jdk 21 - Ndk 21e - Windows 11

 

TinyPortal © 2005-2018