-1

I have a multi-file project that was created in Delphi5 and I am attempting to compile in Delphi XE6.

In my DSPack.pas file I get the error: "'jedi.inc' could not be found..." related to the code line:

{$I jedi.inc} 

... there are also many, mostly "undeclared identifier", errors shown as errors - but named as initial errors, which I presume are because the compiler can't find the jedi.inc file...

I have located the jedi file - jcl- in my Comps folder.

My question is three-fold:

One: Why does XE6 not register jedi.inc whereas it did in Delphi 5?

Two: Where is jedi file usually located?

I believe I have downloaded an updated version of jcl file (jcl-2.6.0.5178).

Three: What do I need to do in my project so that the compiler and find the jedi.inc file?

MartynA
  • 30,454
  • 4
  • 32
  • 73
Brent
  • 55
  • 1
  • 7
  • http://wiki.delphi-jedi.org/wiki/JCL_Installation – J... Aug 05 '14 at 18:39
  • 4
    This question appears to be off-topic because it is a support question about the JCL – J... Aug 05 '14 at 18:41
  • I installed that version of JCL/JVCL on XE6 a couple of days ago and it worked fine except for a minor glitch related to D7. Make sure the compiler can find the inc file via the projects' search path. – MartynA Aug 05 '14 at 18:47
  • It is worth noting that the JCL, like any component library, must be recompiled/reinstalled for each new version of the IDE. Installing a component or library in one version of the IDE does not make it available in any other version. – J... Aug 05 '14 at 18:52
  • The tag JCL is for the IBM Mainframe (zOS) Job Control Library !!! – Bruce Martin Aug 05 '14 at 21:31
  • Thank you all. Since I have a trial version of XE6, I will have to do a manual installation. I have located the subdirectory of the "packages" in the jcl directory and now I am locating the "Jcl.dpk" package in order to open and compile it in the IDE... =-) – Brent Aug 06 '14 at 00:33
  • It is posible that jed.inc is not part of Jedi library but that it was created by original project developer as an easy way to include all needed Jedi component files into project. – SilverWarior Aug 06 '14 at 06:27
  • AFAIR, many years ago all *.inc files in JCL project have been moved from source\ folder to subfolder source\include\ – pf1957 Aug 06 '14 at 07:13
  • Try to download latest version of jedi. with JEDI supplies an installator which located at .\install directory of jcl and jvcl. to launch it use "install.cmd" file – kutsoff Aug 06 '14 at 12:30
  • I found the jedi.inc file at: https://github.com/project-jedi/jedi (after researching through this site. Downloaded the zip file and now have it ready to use. – Brent Aug 08 '14 at 01:52
  • I have also successfully installed jcl/jvcl. I manually placed the jedi.inc file into JCL folder but my program STILL cannot locate this file...WHERE should I place this file in my project? or HOW can I tell Delphi exactly where it is? – Brent Aug 08 '14 at 01:58

1 Answers1

0

I imagine you're aware that you can add a .Pas to a project by clicking the Add File to Project button in the D5..XE6 IDE. You can do likewise with an .Inc file. However ...

When you do that for a .Pas file, you can see in the Project Manager pop-up that it has recorded the path to it, and this is sufficient for the compiler to be able to find it. But, for some reason, the same is not the case for an .Inc file. This evidently by design, because this difference has existed at least as far back as D5, IIRC. TBH, I'm not sure why, because several times I've seen problems that would have been avoided if the compiler had been able to find an .Inc file from what the Project Manager obviously knows about its location. So, I can't answer your "why?" query, though I dare say the compiler designers could.

To enable the compiler to find an .Inc file, you have two alternatives to deal with your "how" query (apart from moving the .Inc file, which in the case of a thing as large and complex as the JCL/JVCL is probably not such a good idea):

  • Include the path to the .Inc file in the {$I } directive. In my case, the JCL stuff is located two folders below a Jedi folder which is itself below a Delphi directory on my D: drive, so I would write the "{$I ...}" line as

{$I D:\Delphi\Jedi\JCL\Source\Include\Jedi.Inc}

  • Add the path to the .Inc file to the list of paths under

Project|Options\Delphi compiler|Search path. The first of these methods is probably preferable, because it only involves the .Inc file, whereas the second tells the compiler to look in that path for anything it hasn't already found, which may not always be desirable.

As to your "where" point, as you may have gathered from one of the comments, the location of the Jedi.Inc file(s) in the JCL/JVCL distribution seems to have been moved since olden days to where it is now, which I think is why you're having this problem with something which used to compile under D5.

MartynA
  • 30,454
  • 4
  • 32
  • 73
  • Btw, if whatI've said solves your problem, then if I were you, I'd cut the text of this q right down to the actual point you were asking and delete the other one. Apart from keeping the place tidy, you'll get back the rep you lost for the down-vote on it. Oh, and it's mutually beneficial, rep-wise, if you accept the answer. – MartynA Aug 09 '14 at 21:59
  • Um, I'm not sure why you think " {SI file.inc\Project\comps\dspack} " with the path after the file name. File paths are always written (in code, documentation, anywhere) with the path before the file name. So it would be {$I \project\comps\dspack\file.inc}, assuming your project folder is in the root of the drive. And that's '$' after the '{', btw, not an 'S'. – MartynA Aug 09 '14 at 22:05
  • Not entirely sure what you mean by "cut the text of this q..." But I want to do what's best for all, clarity and rep-wise. Allow me a little time to figure this out more... – Brent Aug 09 '14 at 22:58
  • Actually, I did not know how to format a path. But your sample helps clear this up well. Yeah, I'll be sure to use '$' not 'S' – – Brent Aug 09 '14 at 23:01
  • I have already deleted other question about paths (the one flagged as duplicate). In new question, I removed reference to 'jedi' file and was - hopefully - more clear and succinct. I will apply your suggestions and see if this all pans out. If it works, as I think it will, I'll accept answer from you... – Brent Aug 09 '14 at 23:11
  • Would you be so kind as to rephrase your suggestion in comment "Btw, if what I've said solves your problem..." I would like to better grasp your words. My apologies for not grokking at first. And you have answered both my jedi question and my new path question... How would you suggest I proceed in order to tidy things up? – Brent Aug 10 '14 at 01:27
  • "...to rephrase..." Actually, instead I've taken the liberty of editing what you say in this q to do that, to wrap this up in as few steps as poss. I suggest you delete the third version of your q that you posted since, as you will have gathered from @Ken White's comment to it, re-posting the same q is frowned on here at SO. – MartynA Aug 10 '14 at 06:12
  • Thank you for all your help,your edits, answers and being kind. I tried to explain neutrally...certainly never my intention to re-post same q. – Brent Aug 10 '14 at 17:29