Recent

Author Topic: How to use fcl-net on windows?  (Read 4066 times)

jcbritobr

  • New Member
  • *
  • Posts: 11
How to use fcl-net on windows?
« on: July 18, 2021, 07:46:06 am »
Hello, good morning.

I'm trying to use fcl-net on lazarus in windows os. I know that fcl-net package is present, because I found it on fpc units folder, but the package is not acessible while programming on ide. Ex. Sockets,fpAsync,fpSock are not found.

May someone please help on how to use on windows os?

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1039
Re: How to use fcl-net on windows?
« Reply #1 on: July 18, 2021, 08:20:34 am »
hello,
it seems that the units are not compiled : existing in fpcsrc but ppu not existing  in fpc/units  (lazarus/fpc installed with fpcupdeluxe)

Friendly, J.P
« Last Edit: July 18, 2021, 08:22:17 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

jcbritobr

  • New Member
  • *
  • Posts: 11
Re: How to use fcl-net on windows?
« Reply #2 on: July 18, 2021, 08:32:05 am »
Hello, they are compiled and in unit folder. For some reason, they are not acessible using lazarus.

jcbritobr

  • New Member
  • *
  • Posts: 11
Re: How to use fcl-net on windows?
« Reply #3 on: July 18, 2021, 08:35:04 am »
The units simply are not available under windows.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1039
Re: How to use fcl-net on windows?
« Reply #4 on: July 18, 2021, 08:40:25 am »
fpSock isn't in units directory and uses ssockets works on my computer (Lazarus 2.0.12 fpc 3.2   win 32bits)
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

dbannon

  • Hero Member
  • *****
  • Posts: 1537
    • tomboy-ng, a rewrite of the classic Tomboy
Re: How to use fcl-net on windows?
« Reply #5 on: July 18, 2021, 08:46:40 am »
curious.  This works for me under Linux

uses fpAsync,fpSock, ssockets;

Please check to see if your fpc.cfg file can find that directory you mention, there should be a line like (and I am guessing here, Windows is not my thing) -

Code: [Select]
-FuC:\bin\fpc\3.2.0\units\x86_64Win\*
I do have them compiled and it looks like it happened when I installed FPC320 -

Code: Bash  [Select][+][-]
  1. $> ls -l ~/bin/FPC/fpc-3.2.0/lib/fpc/3.2.0/units/x86_64-linux/fcl-net/
  2. total 696
  3. -rw-r--r-- 1 dbannon dbannon  9536 Jun 15  2020 cnetdb.o
  4. -rw-r--r-- 1 dbannon dbannon 23777 Jun 15  2020 cnetdb.ppu
  5. -rw-r--r-- 1 dbannon dbannon 70088 Jun 15  2020 fpsock.o
  6. -rw-r--r-- 1 dbannon dbannon 77218 Jun 15  2020 fpsock.ppu
  7. -rw-r--r-- 1 dbannon dbannon  1514 Jun 15  2020 fpsock.rsj
  8. -rw-r--r-- 1 dbannon dbannon 79840 Jun 15  2020 netdb.o
  9. -rw-r--r-- 1 dbannon dbannon 32266 Jun 15  2020 netdb.ppu
  10. -rw-r--r-- 1 dbannon dbannon 54072 Jun 15  2020 resolve.o
  11. -rw-r--r-- 1 dbannon dbannon 57778 Jun 15  2020 resolve.ppu
  12. -rw-r--r-- 1 dbannon dbannon   731 Jun 15  2020 resolve.rsj
  13. -rw-r--r-- 1 dbannon dbannon 23384 Jun 15  2020 sslbase.o
  14. -rw-r--r-- 1 dbannon dbannon 24278 Jun 15  2020 sslbase.ppu
  15. -rw-r--r-- 1 dbannon dbannon 23752 Jun 15  2020 sslsockets.o
  16. -rw-r--r-- 1 dbannon dbannon 23001 Jun 15  2020 sslsockets.ppu
  17. -rw-r--r-- 1 dbannon dbannon   899 Jun 15  2020 sslsockets.rsj
  18. -rw-r--r-- 1 dbannon dbannon 95304 Jun 15  2020 ssockets.o
  19. -rw-r--r-- 1 dbannon dbannon 76903 Jun 15  2020 ssockets.ppu
  20. -rw-r--r-- 1 dbannon dbannon  2417 Jun 15  2020 ssockets.rsj

EDIT: mine is a silly question, if fpc.cfg does not have that line, nothing would compile ....

Davo
« Last Edit: July 18, 2021, 08:48:46 am by dbannon »
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

dbannon

  • Hero Member
  • *****
  • Posts: 1537
    • tomboy-ng, a rewrite of the classic Tomboy
Re: How to use fcl-net on windows?
« Reply #6 on: July 18, 2021, 08:51:32 am »
Perhaps you are misunderstanding the error you are getting, can you please quote the actual error message here ?
Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 9534
  • FPC developer.
Re: How to use fcl-net on windows?
« Reply #7 on: July 18, 2021, 11:04:34 am »
fpasync and fpsock are *nix only.

ways to find things like this out:

- from a release, look in the relevant precompiled units/ directories( units/i386-win32/fcl-net and units/i386-win32/fcl-async )

- from the source, look at the fpmake.pp in the package dirs, and see what it is specified for. E.g.

Code: Pascal  [Select][+][-]
  1.  
  2. // ssockets looks like this:
  3.     T:=P.Targets.AddUnit('ssockets.pp',AllUnixOSes+AllWindowsOSes+AllAmigaLikeOSes+[OS2,EMX]);
  4.  
  5. // fpsock looks like this, clearly shorter target list.
  6.  
  7.     T:=P.Targets.AddUnit('fpsock.pp',[linux,freebsd,netbsd,openbsd,dragonfly]);
  8.  
  9.  


PascalDragon

  • Hero Member
  • *****
  • Posts: 3335
  • Compiler Developer
Re: How to use fcl-net on windows?
« Reply #8 on: July 18, 2021, 01:14:45 pm »
I'm trying to use fcl-net on lazarus in windows os. I know that fcl-net package is present, because I found it on fpc units folder, but the package is not acessible while programming on ide. Ex. Sockets,fpAsync,fpSock are not found.

I would not use fpAsync and fpSock. As mentioned they are *nix-only.

Better use ssockets, there you can use TInetServer and TInetSocket.

jcbritobr

  • New Member
  • *
  • Posts: 11
Re: How to use fcl-net on windows?
« Reply #9 on: July 18, 2021, 01:55:30 pm »
Perhaps you are misunderstanding the error you are getting, can you please quote the actual error message here ?
Davo

It doesn't find ssockets as we can see on image below. I'm doing this in a console program. Maybe we have to add a package?

jcbritobr

  • New Member
  • *
  • Posts: 11
Re: How to use fcl-net on windows?
« Reply #10 on: July 18, 2021, 01:56:23 pm »
I'm trying to use fcl-net on lazarus in windows os. I know that fcl-net package is present, because I found it on fpc units folder, but the package is not acessible while programming on ide. Ex. Sockets,fpAsync,fpSock are not found.

I would not use fpAsync and fpSock. As mentioned they are *nix-only.

Better use ssockets, there you can use TInetServer and TInetSocket.

Tryed to do with SSockets, but cant include it on my program.

jcbritobr

  • New Member
  • *
  • Posts: 11
Re: How to use fcl-net on windows?
« Reply #11 on: July 18, 2021, 02:05:15 pm »
I'm trying to use fcl-net on lazarus in windows os. I know that fcl-net package is present, because I found it on fpc units folder, but the package is not acessible while programming on ide. Ex. Sockets,fpAsync,fpSock are not found.

I would not use fpAsync and fpSock. As mentioned they are *nix-only.

Better use ssockets, there you can use TInetServer and TInetSocket.

All seems to be configured. I really dont understand why this package its not available.

jcbritobr

  • New Member
  • *
  • Posts: 11
Re: How to use fcl-net on windows?
« Reply #12 on: July 18, 2021, 02:16:20 pm »
curious.  This works for me under Linux

uses fpAsync,fpSock, ssockets;

Please check to see if your fpc.cfg file can find that directory you mention, there should be a line like (and I am guessing here, Windows is not my thing) -

Code: [Select]
-FuC:\bin\fpc\3.2.0\units\x86_64Win\*
I do have them compiled and it looks like it happened when I installed FPC320 -

Code: Bash  [Select][+][-]
  1. $> ls -l ~/bin/FPC/fpc-3.2.0/lib/fpc/3.2.0/units/x86_64-linux/fcl-net/
  2. total 696
  3. -rw-r--r-- 1 dbannon dbannon  9536 Jun 15  2020 cnetdb.o
  4. -rw-r--r-- 1 dbannon dbannon 23777 Jun 15  2020 cnetdb.ppu
  5. -rw-r--r-- 1 dbannon dbannon 70088 Jun 15  2020 fpsock.o
  6. -rw-r--r-- 1 dbannon dbannon 77218 Jun 15  2020 fpsock.ppu
  7. -rw-r--r-- 1 dbannon dbannon  1514 Jun 15  2020 fpsock.rsj
  8. -rw-r--r-- 1 dbannon dbannon 79840 Jun 15  2020 netdb.o
  9. -rw-r--r-- 1 dbannon dbannon 32266 Jun 15  2020 netdb.ppu
  10. -rw-r--r-- 1 dbannon dbannon 54072 Jun 15  2020 resolve.o
  11. -rw-r--r-- 1 dbannon dbannon 57778 Jun 15  2020 resolve.ppu
  12. -rw-r--r-- 1 dbannon dbannon   731 Jun 15  2020 resolve.rsj
  13. -rw-r--r-- 1 dbannon dbannon 23384 Jun 15  2020 sslbase.o
  14. -rw-r--r-- 1 dbannon dbannon 24278 Jun 15  2020 sslbase.ppu
  15. -rw-r--r-- 1 dbannon dbannon 23752 Jun 15  2020 sslsockets.o
  16. -rw-r--r-- 1 dbannon dbannon 23001 Jun 15  2020 sslsockets.ppu
  17. -rw-r--r-- 1 dbannon dbannon   899 Jun 15  2020 sslsockets.rsj
  18. -rw-r--r-- 1 dbannon dbannon 95304 Jun 15  2020 ssockets.o
  19. -rw-r--r-- 1 dbannon dbannon 76903 Jun 15  2020 ssockets.ppu
  20. -rw-r--r-- 1 dbannon dbannon  2417 Jun 15  2020 ssockets.rsj

EDIT: mine is a silly question, if fpc.cfg does not have that line, nothing would compile ....

Davo

Found that -FuC:\Bn\lazarus\fpc\$FPCVERSION/units/$fpctarget/*
I'll try to include something specific for fcl-net folder.

jcbritobr

  • New Member
  • *
  • Posts: 11
Re: How to use fcl-net on windows?
« Reply #13 on: July 18, 2021, 02:31:46 pm »
curious.  This works for me under Linux

uses fpAsync,fpSock, ssockets;

Please check to see if your fpc.cfg file can find that directory you mention, there should be a line like (and I am guessing here, Windows is not my thing) -

Code: [Select]
-FuC:\bin\fpc\3.2.0\units\x86_64Win\*
...

Davo

Hello. Fixing that path in fpc.cfg solved the issue.
The problem was that the path was pointing to another directory. I think lazarus configure it when installing.
Changing for
Code: Pascal  [Select][+][-]
  1. -FuC:\Bin\lazarus\fpc\$FPCVERSION/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/*

solved the problem. Thanks you all guys.

jcbritobr

  • New Member
  • *
  • Posts: 11
Re: How to use fcl-net on windows?
« Reply #14 on: July 18, 2021, 02:35:16 pm »
curious.  This works for me under Linux

uses fpAsync,fpSock, ssockets;

Please check to see if your fpc.cfg file can find that directory you mention, there should be a line like (and I am guessing here, Windows is not my thing) -

Code: [Select]
-FuC:\bin\fpc\3.2.0\units\x86_64Win\*
...

Davo

Hello. Fixing that path in fpc.cfg solved the issue.
The problem was that the path was pointing to another directory. I think lazarus configure it when installing.
Changing for
Code: Pascal  [Select][+][-]
  1. -FuC:\Bin\lazarus\fpc\$FPCVERSION/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/*

solved the problem. Thanks you all guys.

I dont know how to edit the post. I post the wrong path. The correct is that
Code: Pascal  [Select][+][-]
  1. -FuC:\Bin\lazarus\fpc\$FPCVERSION/units/$fpctarget/*

 

TinyPortal © 2005-2018