Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 453255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:09:13+00:00 2026-05-12T22:09:13+00:00

After I ported Delphi Windows service app to FPC Linux console app I tried

  • 0

After I ported Delphi Windows service app to FPC Linux console app I tried to port program with GUI. I installed newest Lazarus on my Windows machine and converted simple “hello world” app. One unit has form (.dfm file in Delphi). This form was converted to .lfm and .lrs files by Lazarus. But there is problem with compiling this:

windres: C:/htlib/pas/FInfo.lrs:1: syntax error
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 lazarus_test.lpr
...
Compiling C:\htlib\pas\FInfo.pas
Compiling resource C:\htlib\pas\FInfo.lrs
d:\lazarus\fpc\2.2.4\bin\i386-win32\windres.exe: C:/htlib/pas/FInfo.lrs:1: syntax error
C:\htlib\pas\FInfo.pas(366,1) Error: Error while linking
C:\htlib\pas\FInfo.pas(366,1) Fatal: There were 1 errors compiling module, stopping

First lines of FInfo.lrs file which looks like text file (not binary as .res files):

{ This is an automatically generated lazarus resource file }

LazarusResources.Add('TfrmInfo','FORMDATA',[
  'TPF0'#8'TfrmInfo'#7 ...

In designer I can see and edit this form, so I think it was converted with success.
Maybe there is something wrong with .lrs file? Shouldn’t it be binary as .res files?
What should I do to compile this form?

EDIT:

My .pas unit has this form as:

{$R *.lrs}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:09:13+00:00Added an answer on May 12, 2026 at 10:09 pm

    Remove any stray {$R *.res} or {$R *.lrs} directives.

    2.2.x fpc/lazarus versions transform *.res files to .lrs files that are then included as structured constants. Adding *.res independantly produces this fail if included just below the implementation point, like in Delphi. The proper *.lrs inclusion point is in the initialization section.

    Only 2.4.x (RC1 is out) will have “real” resource support base on {$R *.res}. but that will probably take a few months to trickle through (0.9.30)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 276k
  • Answers 276k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can install MindTouch on Windows with IIS6 using the… May 13, 2026 at 2:47 pm
  • Editorial Team
    Editorial Team added an answer The solution I wound up going with was creating a… May 13, 2026 at 2:47 pm
  • Editorial Team
    Editorial Team added an answer Django does not print any errors to the console by… May 13, 2026 at 2:47 pm

Related Questions

I have two issues both related to (I believe) my SQL Server setup. I
Having just read the first four chapters of Refactoring: Improving the Design of Existing
I had created my website on localhost under a subdirectory joomla. Now I have
My python project has a C++ component which is compiled and distributed as a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.