Recent

Author Topic: controls.lpr(731,15) Error: Error while linking in laz4android3.4  (Read 3120 times)

Bandy

  • Jr. Member
  • **
  • Posts: 57
I get controls.lpr(731,15) Error: Error while linking in laz4android3.4 when trying to build a simple app that shows a simple message after installing laz4android and LAMW Version 0.8.6.4 with LAMW manager.

Please help!

dseligo

  • Hero Member
  • *****
  • Posts: 1535
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #1 on: July 05, 2025, 10:23:40 pm »
Copy all messages and put them here, sometimes there is error above final error, which could shed some light on a problem.

How did you install LAMW? Did everything worked out without problems?
For what chipset are you building for?
Did you try to open some demoes that come with LAMW? Did you create regular form (you should use jForm)?
Check controls.lpr, what is around line 731.

tetrastes

  • Hero Member
  • *****
  • Posts: 667
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #2 on: July 05, 2025, 10:59:53 pm »
Rename controls.lpr, as there is controls.pp unit in LCL.

EDIT: corrected typo control.pp -> controls.pp.
« Last Edit: July 05, 2025, 11:14:43 pm by tetrastes »

dseligo

  • Hero Member
  • *****
  • Posts: 1535
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #3 on: July 05, 2025, 11:07:46 pm »
Rename controls.lpr, as there is control.pp unit in LCL.

That's not the problem: 'controls' <> 'control'

tetrastes

  • Hero Member
  • *****
  • Posts: 667
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #4 on: July 05, 2025, 11:11:18 pm »
Sorry, it's typo, the LCL unit is controls.pp.

dseligo

  • Hero Member
  • *****
  • Posts: 1535
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #5 on: July 05, 2025, 11:32:25 pm »
Sorry, it's typo, the LCL unit is controls.pp.

OK, but that still isn't a problem. LAMW doesn't use Lazarus' controls.

tetrastes

  • Hero Member
  • *****
  • Posts: 667
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #6 on: July 06, 2025, 12:55:51 am »
Then sorry for noise. I trusted too much to "write once, compile everywhere".

nobody.00

  • New Member
  • *
  • Posts: 17
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #7 on: July 06, 2025, 02:47:34 am »
Hello,

The lamw install doesn´t use laz4android, look for lamw4windows on Start menu!
No, o LAMW  no use LCL.
My sugestion, is try create a new lamw project and report us .

We stay here to help you!

Bandy

  • Jr. Member
  • **
  • Posts: 57
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #8 on: July 06, 2025, 11:38:14 am »
All the messages:

Messages, Hints: 2
Verbose: Selected chip architecture: armeabi-v7a
Verbose: Taking libraries from folder: C:\Users\Andy\Desktop\Android\AppLAMWProject1\libs\armeabi-v7a
Note: Duplicate unit "controls" in "controls", orphaned ppu "C:\Users\Andy\Desktop\Android\AppLAMWProject1\obj\controls\controls.o"
Note: Duplicate unit "controls" in "LCLBase 3.4", ppu="C:\laz4android3.4\lcl\units\arm-android\controls.ppu", source="C:\laz4android3.4\lcl\controls.pp"
Project: Executing command before: Success
before build...
Compile Project, OS: android, CPU: arm, Target: C:\Users\Andy\Desktop\Android\AppLAMWProject1\libs\armeabi-v7a\libcontrols.so: Exit code 1, Errors: 1
C:\laz4android3.4\fpc\3.2.2\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find -lc
C:\laz4android3.4\fpc\3.2.2\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find -llog
C:\laz4android3.4\fpc\3.2.2\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find -ldl
C:\laz4android3.4\fpc\3.2.2\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find -ljnigraphics
C:\laz4android3.4\fpc\3.2.2\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find -lc
controls.lpr(731,15) Error: Error while linking

I installed LAMW with LAMW Manager. Everything worked out without problems.
Chipset is mt6853 on Samsung Galaxy A32 5G smartphone.
I didn't open some demoes that come with LAMW.
I opened a new project (LAMW [GUI] Android App]) and I used that form from the new project.
Around line 731 is:

begin
       gApp:= jApp.Create(nil);
730  gApp.Title:= 'LAMW GUI JNI Android Bridges Library';
731  gjAppName:= 'org.lamw.applamwproject1';
       gjClassName:= 'org/lamw/applamwproject1/Controls';
       gApp.AppName:=gjAppName;
       gApp.ClassName:=gjClassName;
       gApp.Initialize;
       gApp.CreateForm(TAndroidModule1, AndroidModule1);
end.

tetrastes

  • Hero Member
  • *****
  • Posts: 667
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #9 on: July 06, 2025, 11:50:48 am »
Note: Duplicate unit "controls" in "controls", orphaned ppu "C:\Users\Andy\Desktop\Android\AppLAMWProject1\obj\controls\controls.o"
Note: Duplicate unit "controls" in "LCLBase 3.4", ppu="C:\laz4android3.4\lcl\units\arm-android\controls.ppu", source="C:\laz4android3.4\lcl\controls.pp"

Well well... And what about not usung LCL..?

dseligo

  • Hero Member
  • *****
  • Posts: 1535
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #10 on: July 06, 2025, 02:11:24 pm »
C:\laz4android3.4\fpc\3.2.2\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find -lc
C:\laz4android3.4\fpc\3.2.2\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find -llog
C:\laz4android3.4\fpc\3.2.2\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find -ldl
C:\laz4android3.4\fpc\3.2.2\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find -ljnigraphics
C:\laz4android3.4\fpc\3.2.2\bin\i386-win32\arm-linux-androideabi-ld.bfd.exe: cannot find -lc
controls.lpr(731,15) Error: Error while linking

This could be something with the wrong path.
How are paths set in Project Options, Compiler Options, Paths (Other Unit Files and Libraries)?
Also check Custom Options in Project Options, Compiler Options (-FDC).
Check that paths actually exists.

Quote
Chipset is mt6853 on Samsung Galaxy A32 5G smartphone.
I didn't open some demoes that come with LAMW.

Try to open and compile some demoes that came with LAMW, to see if the problem is in your setup or in your app.
Also try to change Build Chipset (Project Options, [LAMW] Android Project Options, Build, Chipset). I usually build for Aarch64. Try to change this option for your test app and also for demo apps you try.
« Last Edit: July 06, 2025, 02:13:24 pm by dseligo »

dseligo

  • Hero Member
  • *****
  • Posts: 1535
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #11 on: July 06, 2025, 02:12:34 pm »
Note: Duplicate unit "controls" in "controls", orphaned ppu "C:\Users\Andy\Desktop\Android\AppLAMWProject1\obj\controls\controls.o"
Note: Duplicate unit "controls" in "LCLBase 3.4", ppu="C:\laz4android3.4\lcl\units\arm-android\controls.ppu", source="C:\laz4android3.4\lcl\controls.pp"

Well well... And what about not usung LCL..?

Do you actually use LAMW?

tetrastes

  • Hero Member
  • *****
  • Posts: 667
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #12 on: July 06, 2025, 03:58:28 pm »
No, I don't, so I trust you that LAMW don't use LCL. But OP's project (due to dependency on laz4android) obviously does, which leads to duplicate units. Is that normal for LAMW project?
I'll install LAMW, out of curiosity.

Thaddy

  • Hero Member
  • *****
  • Posts: 17468
  • Ceterum censeo Trumpum esse delendum (Tnx Charlie)
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #13 on: July 06, 2025, 04:21:19 pm »
It is not that difficult: LAMW does use the LCL but it DOES NOT use the default visual components.
You need the LAMW versions.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

nobody.00

  • New Member
  • *
  • Posts: 17
Re: controls.lpr(731,15) Error: Error while linking in laz4android3.4
« Reply #14 on: July 07, 2025, 05:26:41 am »
Hello, usually the lamw_manager install is enough and work very well
The error reported, is a missing library on linkage
Check your settings in menu -> Tools -> [LAMW] Android Module Wizard -> Paths Settings [JDK,SDK ,NDK,... ]


My sugestion, is use a lazarus building by LAMW Manager

About LAMW Demos, try this adjust: https://github.com/dosza/LAMWManager-win#cannot-build-lamw-demos
« Last Edit: July 07, 2025, 05:31:14 am by nobody.00 »

 

TinyPortal © 2005-2018