Sign in Join

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

Mailing lists / lazarus / 2012-01

unit system in

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

William Oliveira Ferreira

i was writing my first FastCGI application and on building, i've got this error:
C:\lazarus\packager\registration\fcllaz.pas(1,1) Fatal: Can't find unit system used by fcllaz

my source:

unit unt_principal;
{$mode objfpc}{$H+}
interface
uses
SysUtils, Classes, httpdefs, fpHTTP, fpWeb, mysql51conn, sqldb;
type

{ TgetDBUpdates }

TgetDBUpdates = class(TFPWebModule)
dbConnection: TMySQL51Connection;
Transaction: TSQLTransaction;
sql_Query: TSQLQuery;
procedure DataModuleRequest(Sender: TObject; ARequest: TRequest;
AResponse: TResponse; var Handled: Boolean);
private
{ private declarations }
function GetDBScripts(const UserVersion : String; const UserSystem :
String) : String;
function ValidarDados(const UserVersion : String; const UserSystem :
String) : Boolean;
public
{ public declarations }
end;
var
getDBUpdates: TgetDBUpdates;
implementation
{$R *.lfm}

{ TgetDBUpdates }

procedure TgetDBUpdates.DataModuleRequest(Sender: TObject; ARequest:
TRequest; AResponse: TResponse; var Handled: Boolean);
var
UserVersion : String;
UserSystem : String;
begin
AResponse.ContentType := 'text/sql;charset=latin1;';
UserVersion := ARequest.QueryFields.Values['userversion'];
UserSystem := ARequest.QueryFields.Values['usersystem'];
if ValidarDados(UserVersion, UserSystem) = True Then
AResponse.Contents.Text := GetDBScripts(UserVersion, UserSystem);
Handled := True;
end;
function TgetDBUpdates.GetDBScripts(const UserVersion: String; const
UserSystem : String): String;
begin
Result := EmptyStr;
try
sql_Query.SQL.Add('SELECT upd_script FROM dbu_scripts WHERE upd_sistema =
:UserSystem AND upd_versao > :UserVerion');
sql_Query.ParamByName('UserVersion').AsString := UserVersion;
sql_Query.ParamByName('UserSystem').AsString := UserSystem;
sql_Query.Open;
sql_Query.First;
while not sql_Query.EOF do
Result := Result + sql_Query.FieldByName('upd_script').AsString;
except
Result := '[ERROR]';
end;
end;
function TgetDBUpdates.ValidarDados(const UserVersion: String;
const UserSystem: String): Boolean;
begin
Result := True;
end;
initialization
RegisterHTTPModule('TFPWebModule1', TgetDBUpdates);
end.

but the point is: why fpc raised that error if the fcllaz.pas doesn't directly import that unit?

{ This file was automatically created by Lazarus. Do not edit! This source is only used to compile and install the package. }

unit fcllaz;
interface
uses
RegisterFCL, db, process, simpleipc, eventlog, XMLConf, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('RegisterFCL', @RegisterFCL.Register);
end;

initialization
RegisterPackage('FCL', @Register);
end.
________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120118/3905fe31/attachment.html>

Reply by email

Mattias Gaertner
to William Oliveira Ferreira
i was writing my first FastCGI application and on building, i've got this error: C:\lazarus\packager\registration\fcllaz.pas(1,1) Fatal: Can't find unit system used by fcllaz

Check that you have a fpc.cfg and that it has valid -Fu paths.

but the point is: why fpc raised that error if the fcllaz.pas doesn't directly import that unit?

The system unit is always used.

[...]

Mattias

Reply by email

William Oliveira Ferreira
to Mattias Gaertner

i'll check it latter, now i'm using linux and there the project builds fine ________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

2012/1/18 Mattias Gaertner

Show quoted text 27 lines
On Wed, 18 Jan 2012 11:08:49 -0200 William Oliveira Ferreira wrote: > i was writing my first FastCGI application and on building, i've got this > error: > C:\lazarus\packager\registration\fcllaz.pas(1,1) Fatal: Can't find unit > system used by fcllaz Check that you have a fpc.cfg and that it has valid -Fu paths. > but the point is: why fpc raised that error if the fcllaz.pas doesn't > directly import that unit? The system unit is always used. >[...] Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120119/b5192299/attachment.html>

Reply by email

William Oliveira Ferreira
to William Oliveira Ferreira

thanks...
________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

2012/1/19 William Oliveira Ferreira

Show quoted text 38 lines
i'll check it latter, now i'm using linux and there the project builds fine ________________________________ William de Oliveira Ferreira Bacharel em Sistemas de Informa??o 2012/1/18 Mattias Gaertner > On Wed, 18 Jan 2012 11:08:49 -0200 > William Oliveira Ferreira wrote: > > > i was writing my first FastCGI application and on building, i've got > this > > error: > > C:\lazarus\packager\registration\fcllaz.pas(1,1) Fatal: Can't find unit > > system used by fcllaz > > Check that you have a fpc.cfg and that it has valid -Fu paths. > > > > but the point is: why fpc raised that error if the fcllaz.pas doesn't > > directly import that unit? > > The system unit is always used. > > > >[...] > > Mattias > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120119/57043707/attachment.html>

Reply by email