[fpc-pascal] Statically link library

Darius Blaszyk dhkblaszyk at zeelandnet.nl
Tue Apr 23 22:14:41 CEST 2013

On Apr 21, 2013, at 6:35 PM, Ludo Brands wrote:

> A few things wrong in your files:
> - the c program. When you want to link against msvcrt then you better
> use the ms functions;) There is no filesize, or open, or close (the
> latter are deprecated since a while and not present anymore in msvcrt)
> This runs correctly on my system.
> I have attached the modified files and the 2 .a files (windows x86). The
> MakeFile.win created by wxDev-C++ is included. I renamed the
> Output/MingW/Project1.a to libtest.a. When using wxDev-C++ make sure to
> set the file to compile as a C file. Default is C++ and that uses a
> different name mangling.

Thanks Ludo! Works perfectly also here. However for my understanding. Why does MinGW find open, filesize etc? Is there some header file that "translates" these functions to be compatible with msvcrt? If not I would have to create one myself to limit the amount of work I guess.

Regards, Darius

More information about the fpc-pascal mailing list