Recent

Author Topic: How to instal Generics.Collections?  (Read 12607 times)

Handoko

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
How to instal Generics.Collections?
« on: June 27, 2015, 06:53:30 pm »
Hi all.

I found Generics.Collections library, but I can't install it. Here is the link:
https://github.com/dathox/generics.collections

The error message is:
Quote
Fatal: Cannot find unit Generics used by unit1.

Any idea how to instal it?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to instal Generics.Collections?
« Reply #1 on: June 27, 2015, 07:38:40 pm »
It's not stated anywhere but it requires FPC trunk and probably some patches. Read the current state here.

hnb

  • Sr. Member
  • ****
  • Posts: 270
Re: How to instal Generics.Collections?
« Reply #2 on: June 29, 2015, 08:45:37 am »
Any idea how to instal it?

You can use CodeTyphon ver 5.30 and newer, Generics.Collections is included as part of CT.
Checkout NewPascal initiative and donate beer - ready to use tuned FPC compiler + Lazarus for mORMot project

best regards,
Maciej Izak

Handoko

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
Re: How to instal Generics.Collections?
« Reply #3 on: June 30, 2015, 03:59:09 pm »
@hnb
Thanks for the suggestion. I ever tried CT, but personally I think it's bloated with many things I don't want. Your FreeSparta sounds great, honestly. Unfortunately I just use Lazarus to build some simple utilities not for making money. So I don't wish to spend money for it, at least for now. I bookmarked the webiste but sadly I hear FreeSparta having problems to keep continue, give it some time, you really added many great things. My programming skill are inadequate, or I will sure to join your team.

@Leledumbo
Oh that's the info I really need. Now I know the problem. I'm using FPC 2.6.4, which doesn't support dotted named units. I downloaded FPC 3.1 development release, unfortunately I cannot install it correctly to have my Lazarus run properly. That's sad, even worst, Lazarus still has not planned to use FPC 3.x in the next release. So I have to wait patiently until Lazarus releases Linux 64-bit official download that bundled with FPC 3.1.

Thanks all for the help and info.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4467
  • I like bugs.
Re: How to instal Generics.Collections?
« Reply #4 on: June 30, 2015, 04:30:42 pm »
Lazarus still has not planned to use FPC 3.x in the next release. So I have to wait patiently until Lazarus releases Linux 64-bit official download that bundled with FPC 3.1.

FPC 3.x is not released yet. Lazarus releases only use released versions of FPC. FPC 3.1.x is a development version and Lazarus release will not use it.
You can install FPC development version with fpcup, or wait for the FPC 3.0RC1 which should happen soon.

FreeSparta changes will be merged to Lazarus. Just today I am looking at the commits made by hnb to a dedicated branch.
During July we will have dockable form designer and other things merged.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Handoko

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
Re: How to instal Generics.Collections?
« Reply #5 on: June 30, 2015, 05:16:41 pm »
Fpcup? I never know about it. I've been learning Lazarus since many years ago, but because I'm busy I rarely monitor this forum. Fpcup sounds like what I need to try now.

Glad to know FreeSparta changes will be merged to Lazarus.

I'm proud to use Lazarus  8-). Not because it's free but because it's powerful and still improving, also it has a great community.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to instal Generics.Collections?
« Reply #6 on: June 30, 2015, 07:20:09 pm »
FreeSparta changes will be merged to Lazarus. Just today I am looking at the commits made by hnb to a dedicated branch.
During July we will have dockable form designer and other things merged.
HOOOOOOOORAAAAAAAAAAAY!!!

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: How to instal Generics.Collections?
« Reply #7 on: July 01, 2015, 10:22:03 am »
That's sad, even worst, Lazarus still has not planned to use FPC 3.x in the next release. So I have to wait patiently until Lazarus releases Linux 64-bit official download that bundled with FPC 3.1.

Lazarus is NOT Delphi or some other commercial software! You don't have to wait for anybody. As was mentioned, FPC 3.0 has not been released yet, but nothing stops you from downloading the current release candidate and start using in today. Building a new FPC takes 3 minutes on my system, and very simple to do.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: How to instal Generics.Collections?
« Reply #8 on: July 01, 2015, 11:36:00 am »
That's sad, even worst, Lazarus still has not planned to use FPC 3.x in the next release. So I have to wait patiently until Lazarus releases Linux 64-bit official download that bundled with FPC 3.1.

Lazarus is NOT Delphi or some other commercial software! You don't have to wait for anybody.
That is your choice. My logic on the other hand says that if a well tested version has bugs (like a release version) then I'd rather not use a not well tested development version for my release software. It makes my job of predicting and solving bug a lot easier if I can rely on a base working version with known bugs that I can work around them. So no I'm not going to debug the compiler it self just because you think its preferred than waiting for a release.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: How to instal Generics.Collections?
« Reply #9 on: July 01, 2015, 11:51:07 am »
@JuhaManninen
That would be GREAT !!!

I am using the current generics library for my state-machine battery charger, without problems (fpc 3.1.1).

Code: [Select]
map : TDictionary<TBatteryState, TProcessState>;
map := TDictionary<TBatteryState, TProcessState>.Create(
           TEqualityComparer<TBatteryState>.Construct(Equals, GetHashCode));

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4467
  • I like bugs.
Re: How to instal Generics.Collections?
« Reply #10 on: July 01, 2015, 12:12:12 pm »
@JuhaManninen
That would be GREAT !!!
I am using the current generics library for my state-machine battery charger, without problems (fpc 3.1.1).

Generics.Collections will not be used in Lazarus yet because Lazarus must compile with FPC 2.6.4 for some time still.
I hope Generics.Collections will be added to FPC libs soon though.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: How to instal Generics.Collections?
« Reply #11 on: July 01, 2015, 02:38:04 pm »
So no I'm not going to debug the compiler it self just because you think its preferred than waiting for a release.
Obviously the choice is yours.... But also don't expect Lazarus to release a stable version with a FPC compiler that hasn't been released yet. Duh!

From past experience (using FPC since 2005) the Release Candidates are pretty good and hardly change to release - and nothing like FPC Trunk. I would still consider using an RC for my software (properly tested), but I wouldn't use FPC Trunk.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

WilliamAndrade

  • New member
  • *
  • Posts: 7
Re: How to instal Generics.Collections?
« Reply #12 on: November 06, 2017, 01:11:03 pm »
Guys, i know that some time have passed since the question has made but, how can i install it? In a descritive way please(newbie here)

Thaddy

  • Hero Member
  • *****
  • Posts: 14363
  • Sensorship about opinions does not belong here.
Re: How to instal Generics.Collections?
« Reply #13 on: November 06, 2017, 01:20:51 pm »
In trunk (3.1.1) it is installed by default. It relies on features not yet available in release versions. More specific many compiler features that were added specifically to support rtl-generics.
I will have to check if it is back-ported to the upcoming 3.0.4 release, but I don't think so.
If you want it, use trunk. On e.g. 3.0.2 it is useless to even try...

Some comfort is that it will be mainstream in the future...
For now: use fgl instead. It is not bad.

Note trunk has no installer: you need to build it from source using a 3.0.X bootstrap compiler.
« Last Edit: November 06, 2017, 01:25:51 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

WilliamAndrade

  • New member
  • *
  • Posts: 7
Re: How to instal Generics.Collections?
« Reply #14 on: November 06, 2017, 01:43:45 pm »
Thanks for reply, the reason for use that lib/package it was for a production software, i've been trying to convert some units used on a delphi driver for MongoDB: https://github.com/grijjy/DelphiMongoDB, https://github.com/grijjy/GrijjyFoundation, https://blog.grijjy.com/2017/09/21/working-with-big-data-databases-in-delphi-cassandra-couchbase-and-mongodb-part-3-of-3/. And in one of these units theres a use of Generics.Collections and then i've came here, now i think that some C++ driver is the way to go, but is good to know that this feature will be default and sorry for any errors i'm not a english speaker

 

TinyPortal © 2005-2018