Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
Lazarus Extra Components
»
identifier not found
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Lazarus for Windows on aa...
by
Wallaby
[April 23, 2024, 11:46:56 pm]
Parameter passing odditie...
by
KodeZwerg
[April 23, 2024, 11:04:39 pm]
Can function be used for ...
by
jamie
[April 23, 2024, 10:53:10 pm]
(Solved) TIndexedAVLTree ...
by
lainz
[April 23, 2024, 10:49:03 pm]
Demo Scene Picture sinwav...
by
KodeZwerg
[April 23, 2024, 10:26:21 pm]
fkInternalCalc
by
zraja
[April 23, 2024, 09:31:07 pm]
A fairly simple sound sol...
by
KodeZwerg
[April 23, 2024, 09:23:37 pm]
add new targets to make
by
marcov
[April 23, 2024, 08:38:42 pm]
how to tweek fpmake to co...
by
marcov
[April 23, 2024, 08:29:16 pm]
Quirky windows
by
ASerge
[April 23, 2024, 07:07:16 pm]
[Request] Demo Scene Sub ...
by
Gigatron
[April 23, 2024, 06:29:39 pm]
Unlocking Files
by
KodeZwerg
[April 23, 2024, 06:03:08 pm]
[SOLVED] trunk bug for mi...
by
Key-Real
[April 23, 2024, 05:56:32 pm]
Demo Scene Bitmap Font Sc...
by
Gigatron
[April 23, 2024, 05:56:27 pm]
Compile/Convert Delphi pr...
by
Martin_fr
[April 23, 2024, 05:43:11 pm]
Generics - correct syntax
by
Thaddy
[April 23, 2024, 05:40:59 pm]
InstallAware Using Lazaru...
by
msintle
[April 23, 2024, 05:26:36 pm]
Xcode Command Line Tools ...
by
Joseph
[April 23, 2024, 05:16:39 pm]
Offical launch of the 1 B...
by
Hartmut
[April 23, 2024, 04:49:29 pm]
what to do if my target M...
by
nickysn
[April 23, 2024, 04:16:02 pm]
compiler error in unit
by
paule32
[April 23, 2024, 03:49:50 pm]
Multithreading - synchron...
by
mika
[April 23, 2024, 01:48:51 pm]
May be useful to somebody
by
KodeZwerg
[April 23, 2024, 12:38:22 pm]
match automatic highlight...
by
Чебурашка
[April 23, 2024, 11:35:14 am]
Tchart with dual numbers ...
by
wp
[April 23, 2024, 10:48:18 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: identifier not found (Read 8337 times)
mrspock1
New Member
Posts: 29
identifier not found
«
on:
August 02, 2018, 10:04:56 am »
I downloaded
https://github.com/maciej-izak/generics.collections
and put the "src" and "inc" directories in the project=>options=> other unit files
in the "uses" I added "Contnrs" and "Generics.Collections"
I get identifier not found while putting in the code
type
b=TQueue;
a= TDictionary;
Logged
Handoko
Hero Member
Posts: 5158
My goal: build my own game engine using Lazarus
Re: identifier not found
«
Reply #1 on:
August 02, 2018, 10:23:13 am »
Try this:
01. Start a new project
02. Lazarus main menu >
File
>
Open
03. Browse to the [location]
\src
04. Open the file named
generics.collections.pas
05. Lazarus main menu >
Project
>
Add Editor File to Project
06. Answer
Yes
(when asked Add to unit search path?)
07. Goto the tab
unit1
(your source code)
08. Type
Generics.Collections
in the uses clauses
09. It should work now
Logged
mrspock1
New Member
Posts: 29
Re: identifier not found
«
Reply #2 on:
August 02, 2018, 10:37:45 am »
There is some progress. Type definitions are OK.
but I get the message
The GDB command:
"-environment-cd "C:/Users/mariu/AppData/Local/Temp/""
returned the error:
",msg="C:/Users/mariu/AppData/Local/Temp/: Permission denied.""
I do not know where to set this to a different directory
Logged
Handoko
Hero Member
Posts: 5158
My goal: build my own game engine using Lazarus
Re: identifier not found
«
Reply #3 on:
August 02, 2018, 10:40:14 am »
I use Linux but my guess is you had not save the project. Try to save the project first before running:
Lazarus main menu > File > Save All
Logged
mrspock1
New Member
Posts: 29
Re: identifier not found
«
Reply #4 on:
August 02, 2018, 10:58:33 am »
I had to start a new project as there were some errors unsolvable. Repeated everything and get the same message "identifier not found" regarding Tqueue and Tdictionary.
Now I do not know at all where I did something wrong.
Logged
marcov
Administrator
Hero Member
Posts: 11458
FPC developer.
Re: identifier not found
«
Reply #5 on:
August 02, 2018, 12:14:13 pm »
Quote from: mrspock1 on August 02, 2018, 10:04:56 am
type
b=TQueue;
a= TDictionary;
This is correct, since it requires specialization TQueue<ATYTPE> or TDICTIONARY<ATYPE>
Make sure you enable delphi mode, so you don't have to learn the old objfpc generics dialect.
Logged
mrspock1
New Member
Posts: 29
Re: identifier not found
«
Reply #6 on:
August 02, 2018, 02:17:23 pm »
That is correct, I used in the first place
b=TQueue<byte>;
a= TDictionary<byte,byte>;
and got ";" expected but "<" found. So removed all within <> and then there was the message identifier not found.
Logged
Thaddy
Hero Member
Posts: 14382
Sensorship about opinions does not belong here.
Re: identifier not found
«
Reply #7 on:
August 02, 2018, 02:49:03 pm »
I think you are mixing up mode delphi and mode objfpc.
Mode objfpc (default, als, in Lazarus) has a very different syntax for generics.
Logged
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.
mrspock1
New Member
Posts: 29
Re: identifier not found
«
Reply #8 on:
August 02, 2018, 03:03:32 pm »
I have previously set
compiler options=>analysis=>syntax mode=> Delphi (-MDelphi)
Logged
marcov
Administrator
Hero Member
Posts: 11458
FPC developer.
Re: identifier not found
«
Reply #9 on:
August 02, 2018, 03:04:15 pm »
Or it finds the contnrs versions. Remove contnrs from the uses.
Logged
mrspock1
New Member
Posts: 29
Re: identifier not found
«
Reply #10 on:
August 02, 2018, 03:13:20 pm »
The same problem
type
b=TQueue<byte>;
a= TDictionary<byte,byte>;
";" expected but "<" found
Logged
mrspock1
New Member
Posts: 29
Re: identifier not found
«
Reply #11 on:
August 02, 2018, 03:47:52 pm »
Ops.. my mistake
So I removed "contnrs" from the uses in Unit1
and put
unit Unit1;
{$MODE DELPHI}{$H+}
and now all works
only I did not expect to have so much trouble
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
Lazarus Extra Components
»
identifier not found
TinyPortal
© 2005-2018