[fpc-pascal] connecting with Delphi (object files, dll etc), assemblers and FPC
Пётр Косаревский
ppkk at mail.ru
Fri Mar 31 15:58:27 CEST 2006
Florian Klaempfl wrote:
> Пётр Косаревский wrote:
> > 3. Connecting object file is difficult: FPC doesn't support OMF (object files), and in FPC 2.0.2 support for COFF (object files) seems to be dropped. FPC produces PECOFF (object files).
> FPC supports OMF by using NASM/MASM/TASM as assembler (e.g. -Amasm).
Oh.
I tried several assemblers (nasm-wasm and masm=renamed ml, MS assembler). I didn't use special options, but masm and wasm didn't compile, and nasm(win32) generated GPF-ing .exe (in program mode).
In all three modes program without asm usage worked (by itself or by calling function from dll/unit).
(I didn't post it as FPC bug, because I'm not using these tools regularly and don't want to prove or falsely proclaim FPC guilt.)
I had some issues (both in unit, library and program modes):
MASM (ML, version 7.10.3077)
(minor) constant strings contained symbols from 128-255 region (russian text used for debugging messages)
and were converted into too long strings (not really long: no more than 320 symbols in my case)
(by the way, using crt (i know it's legacy stuff) converts such symbols into '?', and so do
mailers of many posters: Florian was rare one to save my russian name (unreadable by many))
(fatal for me) (line 18465 [near eof]) "fatal error A1010: unmatched block nesting : _BSS"
(fatal too, but macabre [I need OMF]) (line 2 [near file beginning])"error A2214: GROUP directive not allowed with /coff option"
WASM (Open Watcom Assembler Version 1.2)
(fatal for me) (line 17949 [near eof]) "Error! E506: block nesting error".
NASM (version 0.98)
I have already typed: program was compiled, but .exe happily outputs "Run time error 216..."
I have not checked lines-too-long (i.e. db too complex) for wasm and nasm.
I wrote this message both because want my problem be solved (now I believe in some crude workaround), and to help developers expect issues of the software discussed.
More information about the fpc-pascal
mailing list