Pomoc s lazarus free pascal

Programovacie jazyky, rady, poradňa...
horsiq
Amateur
Amateur
Príspevky: 22
Registrovaný: 26 jún 2010, 7:09

Pomoc s lazarus free pascal

Príspevok od používateľa horsiq »

Mám jednoduchý program v Lazarus free pascale.

Kód: Vybrať všetko

program Project1;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes, SysUtils, CustApp
  { you can add units after this };

type

  { TMyApplication }

  TMyApplication = class(TCustomApplication)
  protected
    procedure DoRun; override;
  public
    constructor Create(TheOwner: TComponent); override;
    destructor Destroy; override;
    procedure WriteHelp; virtual;
  end;

{ TMyApplication }

procedure TMyApplication.DoRun;
var
  ErrorMsg: String;
begin
  // quick check parameters
  ErrorMsg:=CheckOptions('h','help');
  if ErrorMsg<>'' then begin
    ShowException(Exception.Create(ErrorMsg));
    Terminate;
    Exit;
  end;

  // parse parameters
  if HasOption('h','help') then begin
    WriteHelp;
    Terminate;
    Exit;
  end;

  { add your program here }

  // stop program loop
  Terminate;
end;

constructor TMyApplication.Create(TheOwner: TComponent);
begin
  inherited Create(TheOwner);
  StopOnException:=True;
end;

destructor TMyApplication.Destroy;
begin
  inherited Destroy;
end;

procedure TMyApplication.WriteHelp;
begin
  { add your help code here }
  writeln('Usage: ',ExeName,' -h');
end;

var
  Application: TMyApplication;

{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}

begin
  Application:=TMyApplication.Create(nil);
  Application.Title:='My Application';
  Application.Run;
  Application.Free;
end.
           
- toto je hlavný súbor a
toto je podprogram v inom súbore

Kód: Vybrať všetko

unit myprogram1; 

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  StdCtrls;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    procedure Label1Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end; 

var
  Form1: TForm1; 

implementation

{ TForm1 }

procedure TForm1.Label1Click(Sender: TObject);
begin

end;

initialization
  {$I myprogram1.lrs}

end.
                   
           
a toto mi vyhodí kompilátor.

Kód: Vybrať všetko

windres: can't open file `project1.manifest': No such file or directory
Hint: Start of reading config file c:\lazarus\fpc\2.2.4\bin\i386-win32\fpc.cfg
Hint: End of reading config file c:\lazarus\fpc\2.2.4\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.2.4 [2009/10/25] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Win32 for i386
Compiling C:\Users\Nepta\AppData\Local\Temp\project1.lpr
Compiling resource C:\Users\Nepta\AppData\Local\Temp\project1.rc
c:\lazarus\fpc\2.2.4\bin\i386-win32\windres.exe: can't open file `project1.manifest': No such file or directory
project1.lpr(79,1) Error: Error while linking
project1.lpr(79,1) Fatal: There were 1 errors compiling module, stopping


na čo ten súbor project1.manifest je ? a kde by som ho našiel ? alebo ako by som ho mal vytvoriť ?
audiotrack
VIP
VIP
Používateľov profilový obrázok
Príspevky: 25958
Registrovaný: 09 sep 2005, 18:39
Kontaktovať používateľa:

Re: Pomoc s lazarus free pascal

Príspevok od používateľa audiotrack »

akú verziu lazarusu používaš? Podľa bugtrackeru to je od verzie 0.9.29 opravené
Mmartin
Guru
Guru
Používateľov profilový obrázok
Príspevky: 2786
Registrovaný: 07 feb 2009, 12:49
Bydlisko: Bratislava

Re: Pomoc s lazarus free pascal

Príspevok od používateľa Mmartin »

Natrezim
Medium Star
Medium Star
Používateľov profilový obrázok
Príspevky: 390
Registrovaný: 01 apr 2009, 15:07
Bydlisko: SVK Prievidza

Re: Pomoc s lazarus free pascal

Príspevok od používateľa Natrezim »

A povieš mi prosím ťa kde to tam stiahnem ??
Pretože tým obrovským tlačítkom DOWNLOAD ma to aj tak hodí len na tú stránku Lazarusu (http://sourceforge.net/projects/lazarus/files/) a tam je dostupná len 0.9.28.2
Fakt by ma zaujímalo s kade máte všetci tú verziu 0.9.29.
DjBass
Darca
Darca
Používateľov profilový obrázok
Príspevky: 2068
Registrovaný: 24 máj 2008, 13:07
Bydlisko: Košice
Kontaktovať používateľa:

Re: Pomoc s lazarus free pascal

Príspevok od používateľa DjBass »

Napísať odpoveď