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

  • SEARCH
  • Home
  • 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

Related Questions

I have ported our project from Delphi 7 to Delphi 2010. After adding some
I writing a program in Delphi 2010. Part of the program deals with File
I've got a problem with my universal app that I just recently ported to
* EDIT 1 * Of course, just after I posted i tried to uninstall
I posted a question re LDAP account management, but after exploring this, it's not
After repeated searching I have not found an elegant solution to this issue: how
After a small amount of research it seems that TCP MD5 Signatures are enabled
after I run node-waf configure and node-waf build , a .lock-wscript show in my
After a lot of fight I figured out in a declaration like int A[2][3],
After I've asked for a method to combine 2 arrays I got several answers

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.