Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
Serial in uses 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
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
WIKI Timeout issues
Please read here if you have trouble connecting to the wiki
Recent
Gateway Timeouts
by
Joanna
[
Today
at 12:44:33 am]
Testers required for LAMW...
by
nicelybrewed
[
Today
at 12:38:21 am]
What is your favorite "bu...
by
440bx
[
Today
at 12:31:17 am]
IDE/ New Plugin
by
anderbelluno
[
Today
at 12:19:10 am]
Firebird 5.02. - the root...
by
duralast
[June 12, 2025, 11:52:43 pm]
Compiler can't find a (fa...
by
cdbc
[June 12, 2025, 11:35:34 pm]
Lazarus Portable image fi...
by
CharlyTango
[June 12, 2025, 11:18:49 pm]
TimageList - Lazarus 4 wi...
by
wp
[June 12, 2025, 11:17:32 pm]
Filtering a TStringGrid. ...
by
Nicole
[June 12, 2025, 10:52:34 pm]
functional IF
by
Warfley
[June 12, 2025, 10:37:12 pm]
Destructing object whose ...
by
AlexanderK
[June 12, 2025, 10:21:06 pm]
[SOLVED] macOS/Cocoa - Bl...
by
zeljko
[June 12, 2025, 08:47:22 pm]
Linux - partly off topic...
by
Nicole
[June 12, 2025, 08:40:34 pm]
Replace data in an existi...
by
Roni Wolf
[June 12, 2025, 08:06:41 pm]
[Solved] Access violation...
by
Wilko500
[June 12, 2025, 07:37:29 pm]
InstallAware 2025 Sources...
by
440bx
[June 12, 2025, 07:16:41 pm]
Fast Canvas Library V1.0
by
Gigatron
[June 12, 2025, 06:44:27 pm]
FPC 3.2.2 - checksum Erro...
by
paule32
[June 12, 2025, 06:06:55 pm]
Output buffer to audio.
by
Fred vS
[June 12, 2025, 06:00:36 pm]
TProcess freeze
by
LemonParty
[June 12, 2025, 05:47:18 pm]
StringGrid - How to force...
by
etrusco
[June 12, 2025, 05:38:11 pm]
[SOLVED] Speeding up the ...
by
etrusco
[June 12, 2025, 05:28:25 pm]
Layout problem by nested ...
by
Nicole
[June 12, 2025, 05:08:47 pm]
"LCLVersion" in *.lfm fil...
by
zeljko
[June 12, 2025, 04:54:27 pm]
Concole model programming
by
TBMan
[June 12, 2025, 03:50:18 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Serial in uses not found (Read 6861 times)
Ruptor
Full Member
Posts: 191
Serial in uses not found
«
on:
August 17, 2015, 12:39:20 am »
I have created a program with the example code from the wiki that uses the FPC internal serial code but the compiler says "Cannot find serial used by unit1". It seemed like a simple piece of test code that would get me off the ground but it can't find itself let alone run. Any suggestions since serial is supposed to have been part of FPC since version 2.2.2 and I am running 2.6.4 svnr 48774 under Laz 1.4.0?
Logged
ChrisF
Hero Member
Posts: 542
Re: Serial in uses not found
«
Reply #1 on:
August 17, 2015, 01:07:43 am »
There is an (old) serial.pp unit, but it's for Unix. May be you're using Windows or any non Unix/Linux OS, aren't you ?
«
Last Edit: August 17, 2015, 01:16:41 am by ChrisF
»
Logged
Ruptor
Full Member
Posts: 191
Re: Serial in uses not found
«
Reply #2 on:
August 17, 2015, 02:11:56 am »
Hi Chris
The example is here and says it is for Win7
http://wiki.lazarus.freepascal.org/Hardware_Access
Section 4.4 FPC built in serial unit.
Logged
ChrisF
Hero Member
Posts: 542
Re: Serial in uses not found
«
Reply #3 on:
August 17, 2015, 04:24:08 am »
Well, apparently the windows unit is not present in all FPC source releases (absent into the current 2.6.4 release). But it's present into the current trunk version.
So, you can download only it from here, for instance (Graemeg's mirror):
https://github.com/graemeg/freepascal/blob/master/packages/rtl-extra/src/win/serial.pp
or from the FPC SVN repository if you already use it (in ...\packages\rtl-extra\src\win).
«
Last Edit: August 17, 2015, 05:03:08 am by ChrisF
»
Logged
marcov
Administrator
Hero Member
Posts: 12255
FPC developer.
Re: Serial in uses not found
«
Reply #4 on:
August 17, 2015, 11:16:54 am »
It might only be starting with 3.0.0.
At least 3.x compiles serial for android,linux,netbsd,openbsd,win32 and win64
Logged
Ruptor
Full Member
Posts: 191
Re: Serial in uses not found
«
Reply #5 on:
August 17, 2015, 11:48:07 am »
Ok Guys thanks. What is your recommendation for a route to getting a simple cross platform serial port to work. Is it get FPC 3.x, Synaser, 5dpo, or Tlazserial? Like always there is an infinite number of things that seem to do the same thing and it confuses my poor little brain.
Logged
Jurassic Pork
Hero Member
Posts: 1272
Re: Serial in uses not found
«
Reply #6 on:
August 17, 2015, 12:54:22 pm »
hello,
what do you want to do with your serial access ? is it for a console or a gui application ?
Logged
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko
Ruptor
Full Member
Posts: 191
Re: Serial in uses not found
«
Reply #7 on:
August 17, 2015, 01:07:12 pm »
A GUI for talking to a frequency generator on a serial to USB adapter then maybe multiple adapters. Why does it make a difference isn't a program a program whether it has a GUI or not? I am not an expert high level programmer my background is embedded so to me code is just a flow of bits and what it looks like at the top doesn't really matter.
Oh is it that the operating system gets in the way with a GUI but not with a console program?
«
Last Edit: August 17, 2015, 01:11:40 pm by Ruptor
»
Logged
Jurassic Pork
Hero Member
Posts: 1272
Re: Serial in uses not found
«
Reply #8 on:
August 17, 2015, 01:31:59 pm »
TLazserial is a visual component only for GUI application
. It uses synaser as serial library.
Logged
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko
marcov
Administrator
Hero Member
Posts: 12255
FPC developer.
Re: Serial in uses not found
«
Reply #9 on:
August 17, 2015, 02:05:35 pm »
Quote from: Ruptor on August 17, 2015, 01:07:12 pm
Why does it make a difference isn't a program a program whether it has a GUI or not?
Most GUI models keep the main thread free for GUI events. Usually there is some support for asynchronous components though. Either for asynchronous support in the OS (usually Windows) or emulating it using a thread (read: *nix)
If you want the easiest way you need to honour this difference. If you are a die hard, just stick the component in the thread and arrange your communication between GUI and the thread.
Logged
Ruptor
Full Member
Posts: 191
Re: Serial in uses not found
«
Reply #10 on:
August 17, 2015, 08:27:36 pm »
Thanks for the explanation Marcov. I found this that has Lazarus & FPC 3 so I can try it with the example Serial unit.
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-New-FPC-3-0-and-Lazarus-1-4-Test-Installer-td4040074.html
It also has Arm cross compiler stuff that I want to use so that's neat too.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
Serial in uses not found
TinyPortal
© 2005-2018