Laaca Czech republic, 20.05.2020, 23:15 |
Freepascal and binary files? (Developers) |
Does anybody know whether is possible to somehow include files with binary data into Freepascal sources? --- |
RayeR CZ, 21.05.2020, 01:46 @ Laaca |
Freepascal and binary files? |
I don't know how in FP but in C you can easily use some Bin2H convertor that create a header file with static array definition like const Byte bitmap[32]={0x10, 0x12, ...} and include that generated file in your source (#include "cursor.h"). So if FP can include other files that you can generate during build process you can do it the same way... --- |
Laaca Czech republic, 21.05.2020, 10:36 @ RayeR |
Freepascal and binary files? |
Sure, I wrote similar converter few years ago. It is OK for small data sizes. But for bigger data sizes it is not ideal because it slowes down the compilation. --- |
Rugxulo Usono, 21.05.2020, 02:27 @ Laaca |
Freepascal and binary files? |
> Does anybody know whether is possible to somehow include files with binary |
marcov 21.05.2020, 12:25 @ Laaca |
Freepascal and binary files? |
> Does anybody know whether is possible to somehow include files with binary |
Laaca Czech republic, 21.05.2020, 17:30 @ marcov |
Freepascal and binary files? |
> Since Delphi uses resources, Free Pascal has generalized them. Since go32v2 --- |
marcov 22.05.2020, 13:17 @ Laaca |
Freepascal and binary files? |
> |
Rugxulo Usono, 31.05.2020, 18:50 @ Laaca |
Freepascal and binary files? |
> Does anybody know whether is possible to somehow include files with binary |
CandyMan 11.06.2020, 12:29 @ Laaca |
Freepascal and binary files? |
You can use FASM as below. |
Laaca Czech republic, 12.06.2020, 07:37 @ CandyMan |
Freepascal and binary files? |
> You can use FASM as below. --- |
Laaca Czech republic, 29.10.2021, 00:17 @ Laaca |
Freepascal and binary files? |
Sorry for exhuming this thread but I did some further investigation in this topic. --- |
tkchia 30.10.2021, 07:33 (edited by tkchia, 30.10.2021, 18:29) @ Laaca |
Freepascal and binary files? |
Hello Laaca, --- |
Laaca Czech republic, 30.10.2021, 12:29 @ tkchia |
Freepascal and binary files? |
It seems to be some problem with the FPC internal linker. In the past the FPC created only the object files and the external utility (LD.EXE) was called to boil the final EXE. --- |
tkchia 30.10.2021, 19:01 @ Laaca |
Freepascal and binary files? |
Hello Laaca, --- |
Rugxulo Usono, 28.08.2022, 23:21 @ tkchia |
Freepascal and binary files? |
Unrelated to Pascal, but the upcoming C standard C23 will (apparently??) support #embed, see here for details. |