Recent

Author Topic: LAMW JNI folder  (Read 953 times)

CRJ

  • Newbie
  • Posts: 3
LAMW JNI folder
« on: November 14, 2020, 02:31:17 pm »
Is it possible to store source files for a LAMW project outside of the JNI folder?
When I try to include source files from a different folder, I get a linker error.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: LAMW JNI folder
« Reply #1 on: November 15, 2020, 12:15:58 am »

Hi, CRJ!

Welcome!

You can try:

Lazarus IDE menu:

Project --> Project Options

Compiler Options --> Paths --> "other units files(-Fu)"
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

CRJ

  • Newbie
  • Posts: 3
Re: LAMW JNI folder
« Reply #2 on: November 15, 2020, 12:03:06 pm »
Hi jmpessoa,

It's a weird one. I add the path as  you suggest, but I'm still stuck. The compile phase is fine, the problem arises when the linker kicks in ...

controls.lpr (660,15) Error: Error while linking

The line of code is:

  gjAppName:= 'org.jackson.cycling';

As a hacky workaround, If I create symlinks in the jni folder to the necessary units, everything is fine. I'm on Ubuntu 20.04

Thanks.

Segator

  • Full Member
  • ***
  • Posts: 168
    • https://github.com/Nenirey
Re: LAMW JNI folder
« Reply #3 on: November 15, 2020, 05:23:45 pm »
why just not copy al things to the jni folder?
i am Reinier, Nenirey and Segator :) https://github.com/Nenirey

CRJ

  • Newbie
  • Posts: 3
Re: LAMW JNI folder
« Reply #4 on: November 15, 2020, 11:46:19 pm »
Because I want to share a library of units across many projects; both LAMW based projects and regular Lazarus projects. I also don't want duplicate copies of the same units scattered around.

Thanks.

Manlio

  • Full Member
  • ***
  • Posts: 164
  • Pascal dev
Re: LAMW JNI folder
« Reply #5 on: November 19, 2020, 05:08:09 pm »
I wanted to do something similar, and this is what worked for me.

1. The files controls.lpi and controls.lpr contain code that is managed and updated automatically by LAMW, so they must be in the jni folder, or nothing will work.

2. All other source files (forms, units, etc.) can be anywhere you want. Just make sure that you include the path, as explained above:

Lazarus IDE menu:
Project --> Project Options
Compiler Options --> Paths --> "other units files(-Fu)"
manlio mazzon gmail

 

TinyPortal © 2005-2018