4 ms·
Also, C23 has #embed included as a preprocessor directive. It serves similar purpose to include_bytes!(), although I don't think there's a way to specify the se
by trealira 3y ago
Also, C23 has #embed included as a preprocessor directive. It serves similar purpose to include_bytes!(), although I don't think there's a way to specify the section it goes in within the executable.
https://thephd.dev/finally-embed-in-c23 https://thephd.dev/finally-embed-in-c23
- saagarjha 3y agoI haven't used #embed yet personally, but if it gives you an array or similar back then you should be able to apply attributes to the variable to tell the compiler where to store it?
- trealira 3y agoI know GCC has section attributes, but I don't think there's any standard C23 attribute equivalent.