Sign in Join

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

Mailing lists / lazarus / 2012-11

windres long filename bug

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Marco Aurelio Ramirez Carrillo

Hi.
Im trying to migrate some Delphi controls to Lazarus, that use some bitmaps in resource files.

I have change them from bmp format to png,
and use a lazarus tool ( "lazres" ) that call "windres".

I have a bug. It seems that when I use filenames of resources that are longer than DOS 8 characters a bug is created.

Does someone have deal with the same problem, and have some answer ?

I already look in the internet for some info, before asking here. but, got not result.

Thanks.

atte Marco Aurelio Ramirez Carrillo

Reply by email

Bart
to Marco Aurelio Ramirez Carrillo
Marco Aurelio Ramirez Carrillo wrote
and use a lazarus tool ( "lazres" ) that call "windres". I have a bug. It seems that when I use filenames of resources that are longer than DOS 8 characters a bug is created.

Can you show the exact commandline and the output on the console?

Bart

Reply by email

Marco Aurelio Ramirez Carrillo
Can you show the exact commandline and the output on the console? Bart

Hi. As I mention before, Im migrating some components to lazarus.

(1) I have a "TComponent" descendant, called "
tcustomsdvfilefilterscontainer.PNG".

(2) I use lazres like:

"c:\...\lazres.exe filefilt.lrs tcustomsdvfilefilterscontainer.PNG"

No error found.

(3) I have a "sdvtoolsregiste.pas" with code similar to like:

====

unit sdvtoolsregister;
uses
  filefilters;
initialization
{$IFDEF FPC}
{$R 'filefilt.lrs'}
{$END

====

(4) Lazarus generates the following messages when compiling:

Calling resource compiler
"C:\lazarus\fpc\2.6.0\bin\i386-win32\windres.exe" with "--include ./design/ --preprocessor=C:\lazarus\fpc\2.6.0\bin\i386-win32\cpp.exe --include C:\lazarus\fpc\2.6.0\bin\i386-win32\ -O res -o C:\softdev\lazarus\packages\sdvtools\laz60\lib\i386-win32\filefilt.res C:/softdev/lazarus/packages/sdvtools/laz60/design/filefilt.lrs" as command line
windres: C:/softdev/lazarus/packages/sdvtools/laz60/design/filefilt.lrs:1: syntax error
windres: preprocessing failed.
Compiling resource
C:\softdev\lazarus\packages\sdvtools\laz60\design\filefilt.lrs C:\softdev\lazarus\packages\sdvtools\laz60\design\sdvtoolsregister.pas(45,1) Error: Error while compiling resources. Compile with -vd for more details. Check for duplicates.
C:\softdev\lazarus\packages\sdvtools\laz60\design\sdvtoolsregister.pas(45,1) Fatal: There were 1 errors compiling module, stopping

(5) I have already compile some resources, with success, previously.

The only difference I notice, is that I using component resources names & filenames longer than D.O.S. 8 characters, and in some messages a "*~1.PNG" shorten path is displayed for some files.

atte Marco Aurelio Ramirez Carrillo

Reply by email

Bart
to Marco Aurelio Ramirez Carrillo
Marco Aurelio Ramirez Carrillo wrote 14 lines
(3) I have a "sdvtoolsregiste.pas" with code similar to like: ==== unit sdvtoolsregister; uses filefilters; initialization {$IFDEF FPC} {$R 'filefilt.lrs'} {$END ====

IIRC Lazarus resources (cretaed with LazRes) must be included with {$I resourcename.lrs} and not with {$R}

Bart

Reply by email