On 04/23/2013 10:14 PM, Darius Blaszyk wrote: > > > 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. >
Is MinGW finding open, filesize ? When building a static library there is no verification at all if functions really exist. Enter size = whatever(file); and build your static library. You don't get any errors. Only when linking the final executable it will start looking for 'whatever'. In C you don't have to prototype functions. The compiler just assumes an extern int if the function is not defined in the source or an header file and leaves it up to the linker to sort it out. Or worse, lets your program crash if the function exists but has a different parameter list or does not return an int. Welcome to the joys of programming in C ;) Ludo _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal