[fpc-devel]c -> fpc

Peter Beisel beisel at kbprueftechnik.frm.de
Mon Mar 4 10:17:20 CET 2002

Hi all,
I need your help!

Compiler: FPC 1.0.4
Target: GO32V2

I want to link some librarys generated by a 32bit c-compiler
(target: DOS) to my FPC programs.

1. WatCom
Neither the *.LIB nor the *.OBJ files generated by WatCom are
accepted from the FP linker. Is there any way to make them

The *.o files generated by DJGPP are accepted from the FP linker
and the generated EXE-file executes quite well.

BUT: the *.o file represents only the code of the one module.

  long aFunc()

  long aFunk()
    return 4711

compile: test.o

program Testo;
uses crt;
{l test.o}
function aFunc: longint; cdecl; external;
writeln( aFunc);

Compile, link, run: output: 4711 - very well.

You see this little module needs nothing else. All it's code is
represented by it's o-File (test.o). If test.c needs other modules
their code is not represented in test.o. You need to link to this
other modules too. But if there is a reference to a library, there
is no object file that represents the code of the library. You have
to bind a library yourself. And now you are at the point:

How can a library generated by DJGPP linked into a FPC program ??

Regards, Peter

More information about the fpc-devel mailing list