Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-08

FP IDE - can't find System unit

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

What do I need to setup in the FP IDE to be able to compile a simple little app? FPC is setup in my PATH and I can compile the same project from the command line without problems.

Command Line:

fpc testversion.pas

Free Pascal Compiler version 2.1.5 [2007/08/10] for i386 Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for i386
Compiling testversion.pas
Linking testversion
18 lines compiled, 0.1 sec

FP IDE:
* Run FP
* Open testversion.pas
* Alt-F9 and I get the following error
"Fatal: Can't find unit System used by testversion"

Any ideas? Sorry, it's the fist time I'm trying to use the FP IDE.

Regards,
- Graeme -

Jonas Maebe
to Graeme Geldenhuys
Graeme Geldenhuys wrote
What do I need to setup in the FP IDE to be able to compile a simple little app?

Set up the correct unit directories under Options->Directories

Jonas

Graeme Geldenhuys
to Jonas Maebe
Jonas Maebe wrote
Set up the correct unit directories under Options->Directories

So does that mean FP IDE doesn't read the global fpc.cfg file located it /etc or in my $HOME directory? If it doesn't, why not? It would make sense to do so?

BTW:
I'm only trying to compile a very simple application, that doesn't use any units not included in FPC. I can understand that I need to add unit directories for 3rdParty libraries, but not sure why for units included with the Free Pascal Compiler (that's already setup in fpc.cfg).

Here is the source of testversion.pas

-------------------[  testversion.pas  ]-------------------------------
program testversion;
{$mode objfpc}{$H+}
uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes;
begin
  WriteLn('Compiled date: ' + {$I %DATE%});
  WriteLn('Version: ' + {$I %FPCVERSION%});
  WriteLn('Free Pascal Compiler version '
      + {$I %FPCVERSION%} + ' [' + {$I %FPCDATE%} + ']');
end.
---------------------------------  END  ----------------------------------

Regards,
- Graeme -

Marco van de Voort
to Graeme Geldenhuys
Show quoted text 14 lines
On 30/08/2007, Jonas Maebe wrote: > > Set up the correct unit directories under Options->Directories So does that mean FP IDE doesn't read the global fpc.cfg file located it /etc or in my $HOME directory? If it doesn't, why not? It would make sense to do so? BTW: I'm only trying to compile a very simple application, that doesn't use any units not included in FPC. I can understand that I need to add unit directories for 3rdParty libraries, but not sure why for units included with the Free Pascal Compiler (that's already setup in fpc.cfg).

Keep in mind that the cmdline compiler, and the IDE compiler are two separate instances of the compiler. The textmode has fpc.cfg, the IDE its own (possibly directory/project specific) settings.

Graeme Geldenhuys
to Marco van de Voort
Marco van de Voort wrote
Keep in mind that the cmdline compiler, and the IDE compiler are two separate instances of the compiler. The textmode has fpc.cfg, the IDE its own (possibly directory/project specific) settings.

Oh I see. So the FP IDE doesn't just call the textmode fpc (or ppc386) and parse the output into the messages window (like Lazarus does).

In that case I'll just copy the unit paths from my fpc.cfg file into the FP IDE (directories window).

Regards,
- Graeme -

Tomas Hajny
to Marco van de Voort: Keep in mind that the cmdline compiler, and the IDE compiler are two separate instances…
Marco van de Voort wrote 18 lines
> On 30/08/2007, Jonas Maebe wrote: > > > > Set up the correct unit directories under Options->Directories > So does that mean FP IDE doesn't read the global fpc.cfg file located > it /etc or in my $HOME directory? If it doesn't, why not? It would > make sense to do so? > > BTW: > I'm only trying to compile a very simple application, that doesn't > use any units not included in FPC. I can understand that I need to > add unit directories for 3rdParty libraries, but not sure why for > units included with the Free Pascal Compiler (that's already setup in > fpc.cfg). Keep in mind that the cmdline compiler, and the IDE compiler are two separate instances of the compiler. The textmode has fpc.cfg, the IDE its own (possibly directory/project specific) settings.

I'd say the main reason is as follows: IDE maintains the configuration visually (i.e. in user friendlier way). It loads the configuration on startup from a file and saves it back every time one saves the configuration in IDE - at that point the file gets rewritten. In order to be able to load the file, IDE needs to understand its structure fully, which is difficult to achieve with the current file structure together with parallel manual maintenance of the file (for the command-line compiler not providing any other alternative).

Tomas