Recent

Author Topic: compiler cannot find IdSync  (Read 2799 times)

BjPascal

  • New Member
  • *
  • Posts: 15
compiler cannot find IdSync
« on: July 15, 2018, 11:09:28 am »
using Lazarus 1.9.0 in Delphi-mode and FPC 3.1.1 on Win7 x64

This generates: "cannot find IdSync"
Code: Pascal  [Select][+][-]
  1. uses IdSync


However the compiler finds other Indy files in the same folder.
So it knows the folder path. But why can't it find IdSync.pas ?

As a workaround I use
Code: Pascal  [Select][+][-]
  1. IdSync in 'C:\fpcupdeluxe\config_lazarus\onlinepackagemanager\packages\Indy10\Core\IdSync.pas',

But I really don't like that
Isn't there any option to define library folders similar to what Delphi offers?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: compiler cannot find IdSync
« Reply #1 on: July 15, 2018, 11:14:16 am »
Lazarus helps with that. Directories like that are kept bundled with the packages, and you use that by adding a dependency on a package  in your project.

See http://wiki.freepascal.org/Lazarus_Packages#Use_your_package_in_your_project

This keeps hardcoded paths out of projects and makes them more movable over locations and systems.

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: compiler cannot find IdSync
« Reply #2 on: July 15, 2018, 12:13:08 pm »
using Lazarus 1.9.0 in Delphi-mode and FPC 3.1.1 on Win7 x64

This generates: "cannot find IdSync"
Code: Pascal  [Select][+][-]
  1. uses IdSync


However the compiler finds other Indy files in the same folder.
So it knows the folder path. But why can't it find IdSync.pas ?

As a workaround I use
Code: Pascal  [Select][+][-]
  1. IdSync in 'C:\fpcupdeluxe\config_lazarus\onlinepackagemanager\packages\Indy10\Core\IdSync.pas',

But I really don't like that
Isn't there any option to define library folders similar to what Delphi offers?

I also had that issue a  while back. I solved it by adding IdSync to the indylaz package and then recompiling the package. See my post here http://forum.lazarus-ide.org/index.php/topic,20782.msg178791.html#msg178791

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

BjPascal

  • New Member
  • *
  • Posts: 15
Re: compiler cannot find IdSync
« Reply #3 on: July 16, 2018, 01:19:26 am »
Thank you both !
 I added it to indylaz and recompiled and it now works fine

 

TinyPortal © 2005-2018