Sign in Join

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

Mailing lists / fpc-devel / 2007-06

linking resources on win64

7 messages · 6 people ·

Reply by email Subscribe to this list Your subscription

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

Unknown author

Hi,

I am experimenting with the gorc resource compile, which suposedly can create coff object files for win64 from .rc files. See http://www.jorgon.freeserve.co.uk/Resource.htm#int fifth paragraph.

I created lazarus.obj with the following command line: C:\lazarus\source\lazarus\ide>c:\lazarus\downloads\Gorcjorg\GoRC.exe /machine X64 /fo lazarus.obj lazarus.rc

GoRC.Exe Version 0.90.2 - Copyright Jeremy Gordon 1998/2006 - Output file: lazarus.obj format: X64

Then I added this line to my program:
{$LINK lazarus.obj}
I got this error message
C:\lazarus\source\lazarus\ide\lazarus.pp(119,1) Error: Error reading COFF Symtable while reading lazarus.obj
Thne I tried something else and add the line
{$R lazarus.obj}
I starts to look for lazarus.or and I renamed the file. Then I got this error message
C:\lazarus\source\lazarus\ide\lazarus.pp(119,1) Error: Error reading COFF Symtable while reading ..\units\x86_64-win64\lazarus.or

I attached object file that gorc created.

And now the questions:
Am I taking the right steps to includes a resource file that won't be compiled by windres?

Is using gorc a possible way to create resource files for inclusion in win64 programs compiled with fpc?

Why does fpc complain about the COFF Symtable?

Vincent

Reply by email

Jonas Maebe
to Unknown author
Show quoted text 6 lines
Then I added this line to my program: {$LINK lazarus.obj} I got this error message C:\lazarus\source\lazarus\ide\lazarus.pp(119,1) Error: Error reading COFF Symtable while reading lazarus.obj

Isn't this because we don't support the Microsoft .obj format? (the same reason why we can't link other .obj files)

Jonas

Reply by email

Vincent Snijders
to Jonas Maebe
Show quoted text 12 lines
On 29 jun 2007, at 11:12, wrote: > Then I added this line to my program: > {$LINK lazarus.obj} > > I got this error message > C:\lazarus\source\lazarus\ide\lazarus.pp(119,1) Error: Error > reading COFF Symtable while reading lazarus.obj Isn't this because we don't support the Microsoft .obj format? (the same reason why we can't link other .obj files)

I thought COFF is the name of the obj format supported by fpc.

From the gorc help page:

"It can make an OBJ file in COFF format, which is suitable for linking with other OBJ files to produce the final EXE or DLL."

Does Microsoft have a different COFF format?

Vincent

Reply by email

Yury Sidorov
to Jonas Maebe: Isn't this because we don't support the Microsoft .obj format? (the same reason why we…

From: "Jonas Maebe"

Show quoted text 11 lines
On 29 jun 2007, at 11:12, wrote: > Then I added this line to my program: > {$LINK lazarus.obj} > > I got this error message > C:\lazarus\source\lazarus\ide\lazarus.pp(119,1) Error: Error > reading COFF Symtable while reading lazarus.obj Isn't this because we don't support the Microsoft .obj format? (the same reason why we can't link other .obj files)

MS COFF .obj files are supported for win32 and wince. But it was not tested for win64...

Vincent, please create bug report so it will be fixed in future.

Yury.

Reply by email

Vincent Snijders
to Yury Sidorov
Show quoted text 17 lines
From: "Jonas Maebe" > On 29 jun 2007, at 11:12, wrote: > >> Then I added this line to my program: >> {$LINK lazarus.obj} >> >> I got this error message >> C:\lazarus\source\lazarus\ide\lazarus.pp(119,1) Error: Error >> reading COFF Symtable while reading lazarus.obj > > Isn't this because we don't support the Microsoft .obj format? (the > same reason why we can't link other .obj files) MS COFF .obj files are supported for win32 and wince. But it was not tested for win64... Vincent, please create bug report so it will be fixed in future.

Thanks, Yuri, for the clarification. I will create a bug report.

Vincent

Reply by email

Florian Klaempfl
to Vincent Snijders: On Fri, 29 Jun 2007 11:32:19 +0200 I thought COFF is the name of the obj format supported…
Show quoted text 20 lines
On Fri, 29 Jun 2007 11:32:19 +0200 Jonas Maebe wrote: > On 29 jun 2007, at 11:12, wrote: > >> Then I added this line to my program: >> {$LINK lazarus.obj} >> >> I got this error message >> C:\lazarus\source\lazarus\ide\lazarus.pp(119,1) Error: Error >> reading COFF Symtable while reading lazarus.obj > Isn't this because we don't support the Microsoft .obj format? (the > same reason why we can't link other .obj files) I thought COFF is the name of the obj format supported by fpc. > >From the gorc help page: "It can make an OBJ file in COFF format, which is suitable for linking with other OBJ files to produce the final EXE or DLL." Does Microsoft have a different COFF format?

At least 32 and 64 bit ;)

Reply by email