<div><font face="verdana,sans-serif">i was writing my first FastCGI application and on building, i've got this error:<br clear="all"></font></div><div><font face="verdana,sans-serif">C:\lazarus\packager\registration\fcllaz.pas(1,1) Fatal: Can't find unit system used by fcllaz</font></div>
<div><font face="verdana,sans-serif"><br></font></div><div><font face="verdana,sans-serif">my source:</font></div><div><font face="verdana,sans-serif"><br></font></div><div><font face="courier new,monospace">unit unt_principal;<br>
<br>{$mode objfpc}{$H+}<br><br>interface<br><br>uses<br> SysUtils, Classes, httpdefs, fpHTTP, fpWeb, mysql51conn, sqldb;<br><br>type<br><br> { TgetDBUpdates }<br><br> TgetDBUpdates = class(TFPWebModule)<br> dbConnection: TMySQL51Connection;<br>
Transaction: TSQLTransaction;<br> sql_Query: TSQLQuery;<br> procedure DataModuleRequest(Sender: TObject; ARequest: TRequest;<br> AResponse: TResponse; var Handled: Boolean);<br> private<br> { private declarations }<br>
function GetDBScripts(const UserVersion : String; const UserSystem : String) : String;<br> function ValidarDados(const UserVersion : String; const UserSystem : String) : Boolean;<br> public<br> { public declarations }<br>
end; <br><br>var<br> getDBUpdates: TgetDBUpdates;<br><br>implementation<br><br>{$R *.lfm}<br><br>{ TgetDBUpdates }<br><br>procedure TgetDBUpdates.DataModuleRequest(Sender: TObject; ARequest: TRequest; AResponse: TResponse; var Handled: Boolean);<br>
var<br> UserVersion : String;<br> UserSystem : String;<br>begin<br> AResponse.ContentType := 'text/sql;charset=latin1;';<br> UserVersion := ARequest.QueryFields.Values['userversion'];<br> UserSystem := ARequest.QueryFields.Values['usersystem'];<br>
if ValidarDados(UserVersion, UserSystem) = True Then<br> AResponse.Contents.Text := GetDBScripts(UserVersion, UserSystem);<br> Handled := True;<br>end;<br><br>function TgetDBUpdates.GetDBScripts(const UserVersion: String; const UserSystem : String): String;<br>
begin<br> Result := EmptyStr;<br> try<br> sql_Query.SQL.Add('SELECT upd_script FROM dbu_scripts WHERE upd_sistema = :UserSystem AND upd_versao > :UserVerion');<br> sql_Query.ParamByName('UserVersion').AsString := UserVersion;<br>
sql_Query.ParamByName('UserSystem').AsString := UserSystem;<br> sql_Query.Open;<br> sql_Query.First;<br> while not sql_Query.EOF do<br> Result := Result + sql_Query.FieldByName('upd_script').AsString;<br>
except<br> Result := '[ERROR]';<br> end;<br>end;<br><br>function TgetDBUpdates.ValidarDados(const UserVersion: String;<br> const UserSystem: String): Boolean;<br>begin<br> Result := True;<br>end;<br><br>initialization<br>
RegisterHTTPModule('TFPWebModule1', TgetDBUpdates);<br>end.</font><font face="verdana,sans-serif"><br><br>but the point is: why fpc raised that error if the fcllaz.pas doesn't directly import that unit?<br>
</font></div>
<div><font face="verdana,sans-serif"><br></font></div><div><font face="courier new,monospace">{ This file was automatically created by Lazarus. Do not edit!<br> This source is only used to compile and install the package.<br>
}<br><br>unit fcllaz; <br><br>interface<br><br>uses<br> RegisterFCL, db, process, simpleipc, eventlog, XMLConf, LazarusPackageIntf;<br><br>implementation<br><br>procedure Register; <br>begin<br> RegisterUnit('RegisterFCL', @RegisterFCL.Register); <br>
end; <br><br>initialization<br> RegisterPackage('FCL', @Register); <br>end.</font><font face="verdana,sans-serif"> <br></font></div><font face="verdana, sans-serif">________________________________<br>William de Oliveira Ferreira<br>
Bacharel em Sistemas de Informação</font><br>