Forum > General

Serial in uses not found

(1/3) > >>

Ruptor:
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?

ChrisF:
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 ?

Ruptor:
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.

ChrisF:
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).

marcov:
It might only be starting with 3.0.0.

At least 3.x compiles serial for  android,linux,netbsd,openbsd,win32 and win64

Navigation

[0] Message Index

[#] Next page

Go to full version