#compile time file reading
1 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
You cannot read a file at compile time
C23 got #embed, C++26 will probably get it
You can hack your own #embed with python in many cases
If you make the file you want to read into parseable cpp code (ie a const global array or something) you can #include it 😉
theres also INCBIN, to include binary files.
https://github.com/graphitemaster/incbin
That's cool, it'll get the binary data in at link time. Unfortunately won't get the binary data in at compile time if that's a strict requirement.
Good to know, thanks! I'll leave this question opened for a bit longer in case something pops up
@hybrid anchor Has your question been resolved? If so, run !solved :)
This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.
!solved