Recent

Author Topic: Regular GTK error when compiling  (Read 2794 times)

Adie

  • New Member
  • *
  • Posts: 13
Regular GTK error when compiling
« on: November 16, 2018, 07:52:15 pm »
** Newbie **
I am trying to develop an app but regularly get stopped where the compiler cant find:
** snip **
uses
  // RTL
  Classes, SysUtils,
  gtk2, gdk2, glib2,   
*** snap ***
from unit Gtk2CellRenderer;   

I use STANDARD laztoapk 0.9.0.40

the app will work and then as I add another component the compiler just stop at above error and I must start the project from scratch.

1. Even if I remove the last pas file added the error still persist.
2. not even [Clean and build] will solve the issue.

Any ideas what is going on.

Also, the compiler abort the process on most of the demo apps in the
C:\laztoapk\downloads\laz4android1.8\config\onlinepackagemanager\packages\LAMW\demos\GUI
folder.

I was so keen to get my app on Android but this is a big disappointment.

Adie

benohb

  • Full Member
  • ***
  • Posts: 213
Re: Regular GTK error when compiling
« Reply #1 on: November 16, 2018, 10:32:28 pm »

Code: Pascal  [Select][+][-]
  1. Compiler "/usr/local/lib/fpc/3.0.4/ppcx64" does not support target arm-android
Is GTK available in arm ????
Check your compiler
http://wiki.freepascal.org/IDE_Window:_Compiler_Options

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Regular GTK error when compiling
« Reply #2 on: November 16, 2018, 10:59:45 pm »
Hi, Adie!

1) When using LAMW, please, add components only from "Android Bridges ..."  tabs

2) To fix the error:
     2.1 delete the "foreign" component and the units correspondents...
     2.2  clean up the project: "Project" ---> "Project Inspector"  [requerid packages]
             [drop some LCL and Gtk dependencies...]
« Last Edit: November 16, 2018, 11:09:46 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Adie

  • New Member
  • *
  • Posts: 13
[CLOSED] Re: Regular GTK error when compiling
« Reply #3 on: November 17, 2018, 10:23:37 am »
Hi, Adie!

1) When using LAMW, please, add components only from "Android Bridges ..."  tabs

2) To fix the error:
     2.1 delete the "foreign" component and the units correspondents...
     2.2  clean up the project: "Project" ---> "Project Inspector"  [requerid packages]
             [drop some LCL and Gtk dependencies...]

1.  do that.
2. did that.

No success yet.

***** Conclusion *****
I think for the project I will stick to straight Lazarus for WIN based PC and the cross compiler for Raspberry Pi/ (Raspbian) as it works 100%

For the Android part of the project I will stick to Basic4Android as it is stable, compile for all Android devices without any project changes. ( https://www.b4x.com/b4a.html ) I bought the full package and already developed additional libs etc.

The main reason for evaluating Lazarus+Android was code sharing.  If I need to develop the app with unique components in any case it actually defeats the whole object. 

Due to the unique Android design it is not 'really' [Write once - Compile anywhere] with LAMW. If the 'old' [Customdrawn] controls could be used it might work to a certain extend.

B4X is dedicated to Android with a rich set of controls and bullet proof compilation.  I think Laz+LAMW impliment the screen size/rotation easier as B4A but my app is for industrial use where it will run on specific hardware and in Landscape only.

Pic 1. Test app developed in B4A with complete MySQL data connection (Local and remote as well as connection to PLC)  Other apps with B4A talk remotely to scales in furnace etc.

Similar app is running on WIN and Pi with Lazarus.  (Used to program with C++Builder)

I will evaluate Laz+Android options regularly in the future.  At this stage I just don't have the time as the project must be implimented 14 Jan 2019.  :o

Adie
« Last Edit: November 17, 2018, 10:26:09 am by Adie »

 

TinyPortal © 2005-2018